spec/arbre/unit/element_spec.rb in arbre-1.0.2 vs spec/arbre/unit/element_spec.rb in arbre-1.0.3
- old
+ new
@@ -17,11 +17,11 @@
it "should respond to the HTML builder methods" do
expect(element).to respond_to(:span)
end
it "should have a set of local assigns" do
- context = Arbre::Context.new :hello => "World"
+ context = Arbre::Context.new hello: "World"
element = Arbre::Element.new(context)
expect(element.assigns[:hello]).to eq("World")
end
it "should have an empty hash with no local assigns" do
@@ -54,10 +54,10 @@
end
describe "passing in assigns" do
let(:post){ double }
- let(:assigns){ {:post => post} }
+ let(:assigns){ {post: post} }
it "should be accessible via a method call" do
element = Arbre::Element.new(Arbre::Context.new(assigns))
expect(element.post).to eq(post)
end