Skip to content

Commit

Permalink
registration_spec.rb share a method stub in the global "before" block
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Apr 29, 2014
1 parent ea6aca4 commit a8a1a53
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/registration_spec.rb
Expand Up @@ -12,6 +12,7 @@

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

describe ".register" do
Expand All @@ -21,7 +22,6 @@
reg_code = "reg_code"

expect(Registration::SwMgmt).to receive(:zypp_config_writable!)
expect(Registration::Helpers).to receive(:insecure_registration).and_return(false)
SUSE::Connect::Credentials.any_instance.should_receive(:write)
expect(SUSE::Connect::YaST).to(receive(:announce_system)
.with(hash_including(:token => reg_code))
Expand Down Expand Up @@ -56,7 +56,6 @@
.and_return(service)
)

expect(Registration::Helpers).to receive(:insecure_registration).and_return(false)
expect(Registration::SwMgmt).to receive(:add_services)
expect(SUSE::Connect::Credentials).to receive(:read)
.with(SUSE::Connect::Credentials::GLOBAL_CREDENTIALS_FILE)
Expand Down

0 comments on commit a8a1a53

Please sign in to comment.