OSDN Git Service

ご恩登録機能のCRUDをscaffoldベースで生成し実装
[on-kiroku/go_on_kiroku_tyou.git] / spec / views / goons / show.html.erb_spec.rb
1 #encoding: utf-8
2
3 require 'spec_helper'
4
5 describe "goons/show.html.erb" do
6   before(:each) do
7     @goon = assign(:goon, stub_model(Goon,
8       :title => "佐藤さんから誕生日プレゼントを貰った",
9       :who => "佐藤さん",
10       :where => "職場",
11       :description => "リラっくまのぬいぐるみを貰った"
12     ))
13   end
14
15   it "renders attributes in <p>" do
16     render
17     # Run the generator again with the --webrat flag if you want to use webrat matchers
18     rendered.should match(/佐藤さんから誕生日プレゼントを貰った/)
19     # Run the generator again with the --webrat flag if you want to use webrat matchers
20     rendered.should match(/佐藤さん/)
21     # Run the generator again with the --webrat flag if you want to use webrat matchers
22     rendered.should match(/職場/)
23     # Run the generator again with the --webrat flag if you want to use webrat matchers
24     rendered.should match(/リラっくまのぬいぐるみを貰った/)
25   end
26 end