diff --git a/README b/README index da1e5d2..8e77307 100644 --- a/README +++ b/README @@ -73,7 +73,7 @@ In your test_helper.rb/spec_helper.rb: If you don't use rspec_on_rails, or you have specs that aren't of the RailsExampleGroup type, you should do this in spec_helper.rb: require 'dataset' - class Spec::Example::ExampleGroup + class RSpec::Example::ExampleGroup include Dataset datasets_directory "#{Rails.root}/spec/datasets" end diff --git a/spec/dataset/rspec_spec.rb b/spec/dataset/rspec_spec.rb index 56cf709..0c80dd9 100644 --- a/spec/dataset/rspec_spec.rb +++ b/spec/dataset/rspec_spec.rb @@ -1,10 +1,10 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') -class Spec::Example::ExampleGroup +class RSpec::Core::Example::ExampleGroup include Dataset end -describe Spec::Example::ExampleGroup do +describe RSpec::Core::Example::ExampleGroup do with_sandboxed_options do it 'should have a dataset method' do group = Class.new(Spec::Example::ExampleGroup) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b82f933..6fb005d 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -5,12 +5,12 @@ def with_sandboxed_options attr_reader :options before(:each) do - @original_rspec_options = ::Spec::Runner.options - ::Spec::Runner.use(@options = ::Spec::Runner::Options.new(StringIO.new, StringIO.new)) + @original_rspec_options = ::RSpec::Runner.options + ::RSpec::Runner.use(@options = ::RSpec::Runner::Options.new(StringIO.new, StringIO.new)) end after(:each) do - ::Spec::Runner.use(@original_rspec_options) + ::RSpec::Runner.use(@original_rspec_options) end yield