Sha256: 2611662e4f4ec9b52db90ec235b2154233bda16245d4e67cdb72f5bd57ba1af0

Contents?: true

Size: 396 Bytes

Versions: 15

Compression:

Stored size: 396 Bytes

Contents

require 'rails_helper'

RSpec.describe "products/show", :type => :view do
  before(:each) do
    @product = assign(:product, Product.create!(
      :name => "Name",
      :code => "Code",
      :price => "9.99"
    ))
  end

  it "renders attributes in <p>" do
    render
    expect(rendered).to match(/Name/)
    expect(rendered).to match(/Code/)
    expect(rendered).to match(/9.99/)
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
restspec-0.3.2 examples/store-api/spec/views/products/show.html.erb_spec.rb
restspec-0.3.1 examples/store-api/spec/views/products/show.html.erb_spec.rb
restspec-0.3.0 examples/store-api/spec/views/products/show.html.erb_spec.rb
restspec-0.2.6 examples/store-api/spec/views/products/show.html.erb_spec.rb
restspec-0.2.5 examples/store-api/spec/views/products/show.html.erb_spec.rb
restspec-0.2.4 examples/store-api/spec/views/products/show.html.erb_spec.rb
restspec-0.2.3 examples/store-api/spec/views/products/show.html.erb_spec.rb
restspec-0.2.2 examples/store-api/spec/views/products/show.html.erb_spec.rb
restspec-0.2.1 examples/store-api/spec/views/products/show.html.erb_spec.rb
restspec-0.2 examples/store-api/spec/views/products/show.html.erb_spec.rb
restspec-0.1 examples/store-api/spec/views/products/show.html.erb_spec.rb
restspec-0.0.4 examples/store-api/spec/views/products/show.html.erb_spec.rb
restspec-0.0.3 examples/store-api/spec/views/products/show.html.erb_spec.rb
restspec-0.0.2 examples/store-api/spec/views/products/show.html.erb_spec.rb
restspec-0.0.1 examples/store-api/spec/views/products/show.html.erb_spec.rb