Sha256: e5186dc8e52dda13aacecd28df2e8b182eb9013eef980b3904a9ac5e1cdce564
Contents?: true
Size: 782 Bytes
Versions: 3
Compression:
Stored size: 782 Bytes
Contents
require 'spec_helper' describe Taza::FlowGenerator do before(:each) do capture(:stdout) { Taza::SiteGenerator.new(['foo_site']).site } end context "taza flow checkout foo_site" do context "creates" do let(:subject) { Taza::FlowGenerator.new(['checkout', 'foo_site']) } let(:output) { capture(:stdout) { subject.flow } } it 'a checkout.rb' do expect(output).to include('lib/sites/foo_site/flows/checkout.rb') expect(File.exists?('lib/sites/foo_site/flows/checkout.rb')).to be true end it 'a message if site does not exist' do bar_page = capture(:stdout) { Taza::FlowGenerator.new(['checkout', 'bar_site']).flow } expect(bar_page).to include("No such site bar_site exists") end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
taza-2.1.0 | spec/generators/flow_generator_spec.rb |
taza-2.0 | spec/generators/flow_generator_spec.rb |
taza-1.0 | spec/generators/flow_generator_spec.rb |