spec/functional/representation/schema_spec.rb in render-0.0.1 vs spec/functional/representation/schema_spec.rb in render-0.0.2

- old
+ new

@@ -16,11 +16,11 @@ }) brand_name = "Sony" response = { brand: brand_name } - schema.pull(response).should == { + schema.render(response).should == { television: { brand: brand_name } } end it "parses simple arrays" do @@ -32,11 +32,11 @@ } }) television_ids = rand(10).times.collect { UUID.generate } - schema.pull(television_ids).should == { + schema.render(television_ids).should == { televisions: television_ids } end it "parses arrays of objects" do @@ -53,11 +53,11 @@ }) brand_1, brand_2 = *%w(Sony Samsung) response = [{ brand: brand_1 }, { brand: brand_2 }] - schema.pull(response).should == { + schema.render(response).should == { televisions: [{ brand: brand_1 }, { brand: brand_2 }] } end it "parses nested object data" do @@ -76,10 +76,10 @@ }) brand_name = "Sony" response = { brand: { name: brand_name } } - schema.pull(response).should == { + schema.render(response).should == { television: { brand: { name: brand_name } } } end end end