penchant 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/features/gemfile.feature
CHANGED
@@ -35,6 +35,7 @@ Feature: Gemfiles
|
|
35
35
|
Scenario: Simple env
|
36
36
|
Given I have the file "Gemfile.erb" with the content:
|
37
37
|
"""
|
38
|
+
gem 'test'
|
38
39
|
<% env :local do %>
|
39
40
|
gem 'test'
|
40
41
|
<% end %>
|
@@ -44,7 +45,9 @@ Feature: Gemfiles
|
|
44
45
|
"""
|
45
46
|
# generated by penchant, environment: local
|
46
47
|
gem 'test'
|
48
|
+
gem 'test'
|
47
49
|
"""
|
50
|
+
|
48
51
|
Scenario: Use placeholder expansion
|
49
52
|
Given I have the file "Gemfile.erb" with the content:
|
50
53
|
"""
|
data/features/step_definitions/then/the_file_gemfile_should_have_the_following_stripped_content.rb
CHANGED
@@ -2,6 +2,8 @@ Then /^the file "(.*?)" should have the following stripped content:$/ do |file,
|
|
2
2
|
test_lines = string.lines.to_a
|
3
3
|
|
4
4
|
File.read(file).lines.collect(&:strip).reject(&:empty?).to_a.each do |line|
|
5
|
+
raise StandardError.new if test_lines.empty?
|
6
|
+
|
5
7
|
line.strip.should == test_lines.shift.strip
|
6
8
|
end
|
7
9
|
end
|
data/lib/penchant/gemfile.rb
CHANGED
data/lib/penchant/version.rb
CHANGED