Sha256: 7f9a0a6c32d3a25edf25b71f907a672dbba44b664eef9748c910a668299d08ad
Contents?: true
Size: 586 Bytes
Versions: 15
Compression:
Stored size: 586 Bytes
Contents
require 'rails_helper' RSpec.describe "products/index", :type => :view do before(:each) do assign(:products, [ Product.create!( :name => "Name", :code => "Code", :price => "9.99" ), Product.create!( :name => "Name", :code => "Code", :price => "9.99" ) ]) end it "renders a list of products" do render assert_select "tr>td", :text => "Name".to_s, :count => 2 assert_select "tr>td", :text => "Code".to_s, :count => 2 assert_select "tr>td", :text => "9.99".to_s, :count => 2 end end
Version data entries
15 entries across 15 versions & 1 rubygems