spec/lib/guard/rack/command_spec.rb in guard-rack-2.1.0 vs spec/lib/guard/rack/command_spec.rb in guard-rack-2.1.1
- old
+ new
@@ -6,18 +6,18 @@
port: 3000, config: 'config.ru' }
end
let(:options) { default_options }
let(:command) { Guard::Rack::Command.new(options) }
- describe '.initialize' do
- subject { command }
+ describe '#build' do
+ subject { command.build }
it { is_expected.to start_with('rackup') }
it { is_expected.to include('config.ru') }
- it { is_expected.to include('--env development') }
- it { is_expected.to include('--host 0.0.0.0') }
- it { is_expected.to include('--port 3000') }
+ it { is_expected.to include('--env').and include('development') }
+ it { is_expected.to include('--host').and include('0.0.0.0') }
+ it { is_expected.to include('--port').and include('3000') }
it { is_expected.not_to include('--daemonize') }
it { is_expected.not_to include('--debug') }
it { is_expected.not_to include('--server') }
context 'with a custom command configuration' do
@@ -39,16 +39,16 @@
end
context 'with an environment configuration' do
let(:options) { default_options.merge(environment: 'custom') }
- it { is_expected.to include('--env custom') }
+ it { is_expected.to include('--env').and include('custom') }
end
context 'with a server configuration' do
let(:options) { default_options.merge(server: 'thin') }
- it { is_expected.to include('--server thin') }
+ it { is_expected.to include('--server').and include('thin') }
end
context 'with a custom config file configuration' do
let(:options) { default_options.merge(config: 'config2.ru') }