spec/generators/partial_generator_spec.rb in taza-2.1.0 vs spec/generators/partial_generator_spec.rb in taza-3.0.0
- old
+ new
@@ -1,25 +1,25 @@
require 'spec_helper'
describe Taza::PartialGenerator do
before(:each) do
- capture(:stdout) { Taza::SiteGenerator.new(['foo_site']).site }
+ capture_stdout { Taza::SiteGenerator.new(['foo_site']).site }
end
context "taza partial navigation foo_site" do
context "creates" do
let(:subject) { Taza::PartialGenerator.new(['navigation', 'foo_site']) }
- let(:output) { capture(:stdout) { subject.partial } }
+ let(:output) { capture_stdout { subject.partial } }
it 'a navigation.rb' do
expect(output).to include('lib/sites/foo_site/pages/partials/navigation.rb')
expect(File.exists?('lib/sites/foo_site/pages/partials/navigation.rb')).to be true
end
it 'message if site does not exist' do
- bar_page = capture(:stdout) { Taza::PartialGenerator.new(['navigation', 'bar_site']).partial }
+ bar_page = capture_stdout { Taza::PartialGenerator.new(['navigation', 'bar_site']).partial }
expect(bar_page).to include("No such site bar_site exists")
end
end
end
end