penchant 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
  """
@@ -1,6 +1,5 @@
1
1
  @fakefs
2
2
  Feature: Gemfiles
3
- @wip
4
3
  Scenario: Process a pure Ruby gemfile
5
4
  Given I have the file "Gemfile.penchant" with the content:
6
5
  """
@@ -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
@@ -183,6 +183,7 @@ module Penchant
183
183
  def env(check, template = {}, &block)
184
184
  if check.to_s == @environment.to_s
185
185
  original_erbout = @_erbout.dup
186
+ @_erbout = ''
186
187
 
187
188
  output = instance_eval(&block).lines.to_a
188
189
 
@@ -1,3 +1,3 @@
1
1
  module Penchant
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: penchant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: