Sha256: 76b14f5408e6ab77f14e83fedcc74f1a3d69c9121f9e91d66fee1b6c811720ab

Contents?: true

Size: 953 Bytes

Versions: 47

Compression:

Stored size: 953 Bytes

Contents

shared_context "spec files" do
  def failing_spec_filename
    @failing_spec_filename ||= File.expand_path(File.dirname(__FILE__)) + "/_failing_spec.rb"
  end

  def passing_spec_filename
    @passing_spec_filename ||= File.expand_path(File.dirname(__FILE__)) + "/_passing_spec.rb"
  end

  def create_passing_spec_file
    File.open(passing_spec_filename, 'w') do |f|
      f.write %q{
        describe "passing spec" do
          it "passes" do
            expect(1).to eq(1)
          end
        end
      }
    end
  end

  def create_failing_spec_file
    File.open(failing_spec_filename, 'w') do |f|
      f.write %q{
        describe "failing spec" do
          it "fails" do
            expect(1).to eq(2)
          end
        end
      }
    end
  end

  before(:all) do
    create_passing_spec_file
    create_failing_spec_file
  end

  after(:all) do
    File.delete(passing_spec_filename)
    File.delete(failing_spec_filename)
  end

end

Version data entries

47 entries across 47 versions & 12 rubygems

Version Path
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/spec/support/spec_files.rb
vagrant-unbundled-1.9.5.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/spec/support/spec_files.rb
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/spec/support/spec_files.rb
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/spec/support/spec_files.rb
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/spec/support/spec_files.rb
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/spec/support/spec_files.rb
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/spec/support/spec_files.rb
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/spec/support/spec_files.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/rspec-core-2.14.8/spec/support/spec_files.rb
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rspec-core-2.13.0/spec/support/spec_files.rb
rspec-core-2.99.2 spec/support/spec_files.rb
dxruby_rp5-0.0.4 spec/vendor/rspec-core-2.14.7/spec/support/spec_files.rb
rspec-core-2.99.1 spec/support/spec_files.rb
rspec-core-2.99.0 spec/support/spec_files.rb
rspec-core-2.99.0.rc1 spec/support/spec_files.rb
rspec-core-2.14.8 spec/support/spec_files.rb
rspec-core-2.99.0.beta2 spec/support/spec_files.rb
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/rspec-core-2.14.7/spec/support/spec_files.rb
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/rspec-core-2.14.7/spec/support/spec_files.rb
dxruby_rp5-0.0.3 spec/vendor/rspec-core-2.14.7/spec/support/spec_files.rb