one:
title: MyString
description: MyText
image_url: MyString
price: $99.99
two:
title: MyString
description: MyText
image_url: MyString
price: $99.99
ruby:
title: Programming Ruby 1.9
description: MyText
image_url: MyString.png
price: $99.99
require 'test_helper'
class StoreControllerTest < ActionController::TestCase
test "should get index" do
get :index
assert_response :success
assert_select '#columns #side a', minimum: 4
assert_select '#main .entry', 3
assert_select 'h3', 'Programming Ruby 1.9'
assert_select '.price', /\$\d\d\.\d\d/
end
end
beerdy@calculate ~/Dev/depot $ rake test
Run options: --seed 7007
# Running:
.......F...........
Finished in 0.594612s, 31.9536 runs/s, 87.4520 assertions/s.
1) Failure:
StoreControllerTest#test_should_get_index [/home/beerdy/Dev/depot/test/controllers/store_controller_test.rb:9]:
<(?-mix:\$\d\d\.\d\d)> expected but was
<0.0>..
Expected 0 to be >= 1.
19 runs, 52 assertions, 1 failures, 0 errors, 0 skips
# Внимание! Не использовать как данный метод экземпляра
def method
p 'code'
end
def method_inside
p 'code'
end
Изменение занчит - результат предыдыдущего рендеринга?