Skip to content

Commit

Permalink
Convert specs to RSpec 3.0.0 syntax with Transpec
Browse files Browse the repository at this point in the history
This conversion is done by Transpec 2.2.1 with the following command:
    transpec spec/unit

* 4 conversions
    from: obj.should
      to: expect(obj).to

* 3 conversions
    from: == expected
      to: eq(expected)

For more details: https://github.com/yujinakayama/transpec#supported-conversions
  • Loading branch information
Ashley Penney committed Jun 6, 2014
1 parent 9f97fc7 commit 0132518
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/unit/provider/a2mod/gentoo_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

[:conf_file, :instances, :modules, :initvars, :conf_file, :clear].each do |method|
it "should respond to the class method #{method}" do
provider_class.should respond_to(method)
expect(provider_class).to respond_to(method)
end
end

Expand All @@ -24,21 +24,21 @@
@filetype.expects(:read).returns(%Q{APACHE2_OPTS="-D FOO -D BAR -D BAZ"\n})
provider_class.expects(:filetype).returns(@filetype)

provider_class.modules.should == %w{bar baz foo}
expect(provider_class.modules).to eq(%w{bar baz foo})
end

it "should cache the module list" do
@filetype.expects(:read).once.returns(%Q{APACHE2_OPTS="-D FOO -D BAR -D BAZ"\n})
provider_class.expects(:filetype).once.returns(@filetype)

2.times { provider_class.modules.should == %w{bar baz foo} }
2.times { expect(provider_class.modules).to eq(%w{bar baz foo}) }
end

it "should normalize parameters" do
@filetype.expects(:read).returns(%Q{APACHE2_OPTS="-D FOO -D BAR -D BAR"\n})
provider_class.expects(:filetype).returns(@filetype)

provider_class.modules.should == %w{bar foo}
expect(provider_class.modules).to eq(%w{bar foo})
end
end

Expand Down

0 comments on commit 0132518

Please sign in to comment.