spec/generators/page_generator_spec.rb in taza-2.1.0 vs spec/generators/page_generator_spec.rb in taza-3.0.0

- old
+ new

@@ -2,18 +2,18 @@ describe Taza::PageGenerator do include Helpers::Taza before(:each) do - capture(:stdout) { Taza::SiteGenerator.new(['foo_site']).site } + capture_stdout { Taza::SiteGenerator.new(['foo_site']).site } end context "taza page home foo_site" do context "creates" do let(:subject) { Taza::PageGenerator.new(['home', 'foo_site']) } - let(:output) { capture(:stdout) { subject.page }} + let(:output) { capture_stdout { subject.page }} it 'creates a checkout_page.rb' do expect(output).to include('lib/sites/foo_site/pages/home_page.rb') expect(File.exists?('lib/sites/foo_site/pages/home_page.rb')).to be true end @@ -21,10 +21,10 @@ expect(output).to include('spec/isolation/home_page_spec.rb') expect(File.exists?('spec/isolation/home_page_spec.rb')).to be true end it 'gives message if site does not exist' do - bar_page = capture(:stdout) { Taza::PageGenerator.new(['checkout', 'bar_site']).page } + bar_page = capture_stdout { Taza::PageGenerator.new(['checkout', 'bar_site']).page } expect(bar_page).to include("No such site bar_site exists") end it 'generates a page that can be required' do output