Skip to content

Commit

Permalink
allow only the new RSpec "expect" syntax in mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Aug 6, 2014
1 parent 5bbb1f8 commit b61ecb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/registration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
require "registration/registration"

stub_const("Yast::WFM", yast_wfm)
yast_wfm.stub(:GetLanguage).and_return("en")
allow(yast_wfm).to receive(:GetLanguage).and_return("en")
allow(Registration::Helpers).to receive(:insecure_registration).and_return(false)
end

Expand Down
3 changes: 3 additions & 0 deletions test/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
config.expect_with :rspec do |c|
c.syntax = :expect
end
config.mock_with :rspec do |c|
c.syntax = :expect
end
end

$:.unshift(File.expand_path("../../src/lib", __FILE__))
Expand Down

0 comments on commit b61ecb5

Please sign in to comment.