spec/fontcustom/utility_spec.rb in fontcustom-1.3.3 vs spec/fontcustom/utility_spec.rb in fontcustom-1.3.4

- old
+ new

@@ -12,42 +12,42 @@ end it "should include Thor::Action methods" do gen = Generator.new %w|template add_file remove_file|.each do |method| - gen.should respond_to(method.to_sym) + expect(gen).to respond_to(method.to_sym) end end context "#symbolize_hash" do it "should turn string keys into symbols" do gen = Generator.new hash = gen.symbolize_hash "foo" => "bar" - hash.should == { :foo => "bar" } + expect(hash).to eq({ :foo => "bar" }) end end context "#methodize_hash" do it "should define getter method" do gen = Generator.new hash = gen.methodize_hash :foo => "bar" - hash.foo.should == "bar" + expect(hash.foo).to eq("bar") end it "should define setter method" do gen = Generator.new hash = gen.methodize_hash :foo => "bar" hash.foo = "baz" - hash.foo.should == "baz" + expect(hash.foo).to eq("baz") end end context "#write_file" do it "should replace the contents of a file" do gen = Generator.new file = double "file" - File.should_receive(:open).with(fixture("shared/test"), "w").and_yield file - file.should_receive(:write).with("testing") + expect(File).to receive(:open).with(fixture("shared/test"), "w").and_yield file + expect(file).to receive(:write).with("testing") gen.write_file fixture("shared/test"), "testing" end end #context "#say_message" do