spec/it/link_spec.rb in it-0.2.4 vs spec/it/link_spec.rb in it-0.2.5

- old
+ new

@@ -7,19 +7,19 @@ it "should accept a String as frist param" do expect { It::Link.new("http://www.rubyonrails.org/") }.not_to raise_error end it "should accept a Hash as first param" do - expect { It::Link.new({:controller => "articles", :action => "index"}) }.not_to raise_error + expect { It::Link.new({controller: "articles", action: "index"}) }.not_to raise_error end it "should raise a TypeError if the first param is an Integer" do expect { It::Link.new(1) }.to raise_error(TypeError) end it "should accept options as a Hash" do - expect { It::Link.new("http://www.rubyonrails.org/", {:id => "identity", :class => "classy"}) }.not_to raise_error + expect { It::Link.new("http://www.rubyonrails.org/", {id: "identity", class: "classy"}) }.not_to raise_error end it "should raise a TypeError, if the options are a String" do expect { It::Link.new("http://www.rubyonrails.org/", "classy") }.to raise_error(TypeError) end @@ -35,8 +35,8 @@ end end describe It::Link, '#process' do it "should return a link with the options set and the content as label" do - expect(It::Link.new("http://www.rubyonrails.org", :target => "_blank").process("Rails")).to eq('<a href="http://www.rubyonrails.org" target="_blank">Rails</a>') + expect(It::Link.new("http://www.rubyonrails.org", target: "_blank").process("Rails")).to eq('<a href="http://www.rubyonrails.org" target="_blank">Rails</a>') end end