X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=spec%2Fviews%2Fscrolls%2Fshow.html.erb_spec.rb;h=7e59124223f4eef6852ddd966dc728f36aa8b0d8;hb=8a42b6e27d6579a7e824cd3e67c156dc4c6e583a;hp=275542653d2dc7446b124e641ddab7f5f4cc78ae;hpb=45395fe79ebdd3c0d74264ada65acb607fb8bb77;p=pettanr%2Fpettanr.git diff --git a/spec/views/scrolls/show.html.erb_spec.rb b/spec/views/scrolls/show.html.erb_spec.rb index 27554265..7e591242 100644 --- a/spec/views/scrolls/show.html.erb_spec.rb +++ b/spec/views/scrolls/show.html.erb_spec.rb @@ -1,24 +1,32 @@ +# -*- encoding: utf-8 -*- require 'spec_helper' +#スクロール describe 'scrolls/show.html.erb' do before do - @user = FactoryGirl.create( :user_yas) - @author = FactoryGirl.create :author, :user_id => @user.id + @admin =FactoryGirl.create :admin + @user_yas = FactoryGirl.create :user_yas_with_owner + @user_rom = FactoryGirl.create :user_rom + @author_yas = @user_yas.author + end - context 'with 2 widgets' do + describe 'エディタ' do before(:each) do - @scroll = FactoryGirl.create :scroll, :author_id => @author.id - @operators = Operator.new [@user, @author, @artist, @admin, @demand_user] - assign(:item, @scroll) + @item = FactoryGirl.create :scroll_hello, author: @author_yas + @item_id = @item.id + @operators = Operator.new [@user_yas, @author_yas, @artist, @admin, @demand_user] + assign(:item, @item) assign(:play_count, 3) assign(:operators, @operators) end - it 'rendered' do - render - - rendered.should contain('icon') + context 'ownerなとき' do + it 'rendered' do + render + + rendered.should have_tag('h3.edit') + end end end end