spec/rspec/mocks/serialization_spec.rb in rspec-mocks-2.6.0 vs spec/rspec/mocks/serialization_spec.rb in rspec-mocks-2.7.0.rc1
- old
+ new
@@ -62,11 +62,16 @@
expect { set_stub }.to_not change { YAML.dump(subject) }
end
end
with_yaml_loaded do
- compiled_with_psych = RbConfig::CONFIG['configure_args'] =~ /with-libyaml/
+ compiled_with_psych = begin
+ require 'psych'
+ true
+ rescue LoadError => e
+ false
+ end
if compiled_with_psych
context 'using Syck as the YAML engine' do
before(:each) { YAML::ENGINE.yamler = 'syck' }
it_behaves_like 'normal YAML serialization'
@@ -96,10 +101,10 @@
describe "an object that has its own mock_proxy instance variable" do
subject { RSpec::Mocks::SerializableMockProxy.new(:my_mock_proxy) }
it 'does not interfere with its marshalling' do
marshalled_copy = Marshal.load(Marshal.dump(subject))
- marshalled_copy.should == subject
+ marshalled_copy.should eq subject
end
end
end
end
end