Sha256: a0643919a6ac714fdc0b25150c107a02ee868bc061b74fa91e6ecbd283e046c7
Contents?: true
Size: 441 Bytes
Versions: 7
Compression:
Stored size: 441 Bytes
Contents
require 'rails_helper' describe TestController do render_views let(:name) { "name" } subject { get :new, { name: name }} it "renders the view with the correct bindings" do model_name = "TestModel_1" attr_binding = "#{model_name}.name" model_match = subject.body.scan(model_name) attr_match = subject.body.scan(attr_binding) expect(model_match.count).to eq(5) expect(attr_match.count).to eq(4) end end
Version data entries
7 entries across 7 versions & 1 rubygems