Sha256: fce4d44fd9bb7d42580e31046b3dd6ebb5b3ebc5609b21219832134068cf92ca

Contents?: true

Size: 914 Bytes

Versions: 72

Compression:

Stored size: 914 Bytes

Contents

require 'spec_helper'
require 'spork/test_framework_shared_examples'

describe Spork::TestFramework::RSpec do
  it_behaves_like "a TestFramework"

  it "supports rspec 1.x" do
    begin
      Object.const_set(:Spec, Module.new)
      Spec.const_set(:Runner, Module.new)
      Spec::Runner.const_set(:CommandLine, Module.new)
      Spec::Runner.const_set(:OptionParser, Module.new)
      Spec::Runner::OptionParser.stub(:parse)

      framework = Spork::TestFramework::RSpec.new
      framework.stub(:rspec1?).and_return(true)

      Spec::Runner::CommandLine.should_receive(:run)

      framework.run_tests([],StringIO.new,StringIO.new)
    ensure
      Object.__send__(:remove_const, :Spec)
    end
  end

  it "supports rspec >= 2.0" do
    RSpec::Core::CommandLine.any_instance.should_receive(:run)
    framework = Spork::TestFramework::RSpec.new
    framework.run_tests([],StringIO.new,StringIO.new)
  end
end

Version data entries

72 entries across 72 versions & 3 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/spork-0.9.0/spec/spork/test_framework/rspec_spec.rb
classiccms-0.7.4 vendor/bundle/gems/spork-0.9.0/spec/spork/test_framework/rspec_spec.rb
classiccms-0.7.3 vendor/bundle/gems/spork-0.9.0/spec/spork/test_framework/rspec_spec.rb
spork-1.0.0rc4 spec/spork/test_framework/rspec_spec.rb
spork-1.0.0rc4-x86-mswin32 spec/spork/test_framework/rspec_spec.rb
spork-1.0.0rc4-x86-mingw32 spec/spork/test_framework/rspec_spec.rb
classiccms-0.7.2 vendor/bundle/gems/spork-0.9.0/spec/spork/test_framework/rspec_spec.rb
classiccms-0.7.1 vendor/bundle/gems/spork-0.9.0/spec/spork/test_framework/rspec_spec.rb
classiccms-0.7.0 vendor/bundle/gems/spork-0.9.0/spec/spork/test_framework/rspec_spec.rb
classiccms-0.6.9 vendor/bundle/gems/spork-0.9.0/spec/spork/test_framework/rspec_spec.rb
classiccms-0.6.8 vendor/bundle/gems/spork-0.9.0/spec/spork/test_framework/rspec_spec.rb
classiccms-0.6.7 vendor/bundle/gems/spork-0.9.0/spec/spork/test_framework/rspec_spec.rb
classiccms-0.6.6 vendor/bundle/gems/spork-0.9.0/spec/spork/test_framework/rspec_spec.rb
classiccms-0.6.5 vendor/bundle/gems/spork-0.9.0/spec/spork/test_framework/rspec_spec.rb
classiccms-0.6.4 vendor/bundle/gems/spork-0.9.0/spec/spork/test_framework/rspec_spec.rb
classiccms-0.6.3 vendor/bundle/gems/spork-0.9.0/spec/spork/test_framework/rspec_spec.rb
classiccms-0.6.2 vendor/bundle/gems/spork-0.9.0/spec/spork/test_framework/rspec_spec.rb
classiccms-0.6.1 vendor/bundle/gems/spork-0.9.0/spec/spork/test_framework/rspec_spec.rb
classiccms-0.6.0 vendor/bundle/gems/spork-0.9.0/spec/spork/test_framework/rspec_spec.rb
classiccms-0.5.17 vendor/bundle/gems/spork-0.9.0/spec/spork/test_framework/rspec_spec.rb