~ubuntu-branches/ubuntu/wily/cucumber/wily-proposed

« back to all changes in this revision

Viewing changes to spec/cucumber/rake/forked_spec.rb

  • Committer: Package Import Robot
  • Author(s): Cédric Boutillier, Antonio Terceiro, Cédric Boutillier
  • Date: 2015-06-20 16:52:32 UTC
  • mfrom: (1.1.7)
  • Revision ID: package-import@ubuntu.com-20150620165232-hznc8mxma08er27p
Tags: 2.0.0-1
[ Antonio Terceiro ]
* debian/cucumber.pod: fix typo in manpage (Closes: #767215)

[ Cédric Boutillier ]
* Imported Upstream version 2.0.0
* rename the file in debian/missing-source to remove -min suffix, and make
  lintian happy
* reproducibility: use last changelog date to build the manpage
* update 0004-Update_default_binary_path.patch
* drop 0001-Remove-rubygems-bundler-stuff-from-spec_helper.patch, not needed
  anymore
* build-depend on pry
* depend on ruby-cucumber-core

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
module Cucumber
6
6
  module Rake
7
 
 
8
7
    describe Task::ForkedCucumberRunner do
9
 
 
10
8
      let(:libs) { ['lib'] }
11
9
      let(:binary) { Cucumber::BINARY }
12
10
      let(:cucumber_opts) { ['--cuke-option'] }
13
11
      let(:feature_files) { ['./some.feature'] }
14
12
 
15
13
      context "when running with bundler" do
16
 
 
17
14
        let(:bundler) { true }
18
15
 
19
16
        subject { Task::ForkedCucumberRunner.new(
20
17
            libs, binary, cucumber_opts, bundler, feature_files) }
21
18
 
22
19
        it "does use bundler if bundler is set to true" do
23
 
          subject.use_bundler.should be_true
 
20
          expect(subject.use_bundler).to be true
24
21
        end
25
22
 
26
23
        it "uses bundle exec to find cucumber and libraries" do
27
 
          subject.cmd.should == [Cucumber::RUBY_BINARY,
28
 
                                 '-S',
29
 
                                 'bundle',
30
 
                                 'exec',
31
 
                                 'cucumber',
32
 
                                 '--cuke-option'] + feature_files
 
24
          expect(subject.cmd).to eq [Cucumber::RUBY_BINARY,
 
25
            '-S',
 
26
            'bundle',
 
27
            'exec',
 
28
            'cucumber',
 
29
            '--cuke-option'] + feature_files
33
30
        end
34
 
 
35
31
      end
36
32
 
37
33
      context "when running without bundler" do
38
 
 
39
34
        let(:bundler) { false }
40
35
 
41
36
        subject { Task::ForkedCucumberRunner.new(
42
37
            libs, binary, cucumber_opts, bundler, feature_files) }
43
38
 
44
39
        it "does not use bundler if bundler is set to false" do
45
 
          subject.use_bundler.should be_false
 
40
          expect(subject.use_bundler).to be false
46
41
        end
47
42
 
48
43
        it "uses well known cucumber location and specified libraries" do
49
 
          subject.cmd.should == [Cucumber::RUBY_BINARY,
50
 
                                 "-I",
51
 
                                 "\"lib\"",
52
 
                                 "\"#{Cucumber::BINARY }\"",
53
 
                                 "--cuke-option"] + feature_files
 
44
          expect(subject.cmd).to eq [Cucumber::RUBY_BINARY,
 
45
            "-I",
 
46
            "\"lib\"",
 
47
            "\"#{Cucumber::BINARY }\"",
 
48
            "--cuke-option"] + feature_files
54
49
        end
55
 
 
56
50
      end
57
 
 
58
 
 
59
51
    end
60
 
 
61
52
  end
62
53
end