Sha256: 8c59c9aff0e644fef057b080972cd1d00881271a2c5f3ae2ac0999252f85b8ec
Contents?: true
Size: 561 Bytes
Versions: 10
Compression:
Stored size: 561 Bytes
Contents
require 'spec_helper' if defined? ActiveRecord describe "Test helper in form blocks" do let :product do Product.create(:price_cents => 3000, :discount => 150, :bonus_cents => 200, :optional_price => 100, :sale_price_amount => 1200) end context "textfield" do it "uses the current value of money field in textfield" do helper.instance_variable_set :@product, product helper.text_field(:product, :price).should =~ /value=\"#{product.price.to_s}\"/ end end end end
Version data entries
10 entries across 10 versions & 2 rubygems