Skip to content

Commit

Permalink
Move from Spec to RSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
saturnflyer committed Feb 22, 2013
1 parent e8c9163 commit 940c860
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spec/dataset/rspec_spec.rb
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
6 changes: 3 additions & 3 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 940c860

Please sign in to comment.