File: gemspec.feature

package info (click to toggle)
ruby-appraisal 0.5.1-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 192 kB
  • sloc: ruby: 366; makefile: 3
file content (79 lines) | stat: -rw-r--r-- 2,354 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
@disable-bundler
Feature: appraisals using an existing gemspec

  Background:
    Given a directory named "gemspecced"
    And the following installed dummy gems:
      | name       | version |
      | dummy_girl | 1.3.0   |
      | dummy_girl | 1.3.2   |
    When I cd to "gemspecced"
    And I write to "gemspecced.gemspec" with:
    """
    Gem::Specification.new do |s|
        s.name        = %q{gemspecced}
        s.version     = '0.1'
        s.summary     = %q{featureful!}

        s.add_development_dependency('dummy_girl', '1.3.2')
    end
    """
    And a directory named "specdir"
    And I write to "specdir/gemspecced.gemspec" with:
    """
    Gem::Specification.new do |s|
        s.name        = %q{gemspecced}
        s.version     = '0.1'
        s.summary     = %q{featureful!}

        s.add_development_dependency('dummy_girl', '1.3.0')
    end
    """
    And I write to "Appraisals" with:
    """
    appraise "stock" do
      gem "rake"
    end
    """
    When I write to "Rakefile" with:
    """
    require 'rubygems'
    require 'bundler/setup'
    require 'appraisal'
    task :version do
      require 'dummy_girl'
      puts "Loaded #{$dummy_girl_version}"
    end
    """

  Scenario: run a gem in the gemspec
    And I write to "Gemfile" with:
    """
    gemspec
    """
    When I add "appraisal" from this project as a dependency
    And I successfully run `bundle install --local`
    And I successfully run `bundle exec rake appraisal:install --trace`
    And I run `bundle exec rake appraisal version --trace`
    Then the output should contain "Loaded 1.3.2"


  Scenario: run a gem in the gemspec via path
    And I write to "Gemfile" with:
    """
    gemspec :path => './specdir'
    """
    When I add "appraisal" from this project as a dependency
    When I successfully run `bundle exec rake appraisal:install --trace`
    When I run `bundle exec rake appraisal version --trace`
    Then the output should contain "Loaded 1.3.0"

  Scenario: run a gem in the gemspec via path
    And I write to "Gemfile" with:
    """
    gemspec :path => './specdir'
    """
    When I add "appraisal" from this project as a dependency
    When I successfully run `bundle exec rake appraisal:install --trace`
    When I run `bundle exec rake appraisal version --trace`
    Then the output should contain "Loaded 1.3.0"