Skip to content

Commit

Permalink
Removes trailing spaces on ActiveGuide code
Browse files Browse the repository at this point in the history
  • Loading branch information
Brice TEXIER committed Aug 1, 2015
1 parent 6a40137 commit bb72ca2
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions lib/active_guide/base.rb
Expand Up @@ -28,7 +28,7 @@ module ActiveGuide
class Base

attr_reader :root

def initialize(name, &block)
@root = Group.new(nil, :root, &block)
end
Expand All @@ -40,7 +40,7 @@ def run(*args)
analyzer ||= SimpleAnalyzer.new
analyzer.run(self, options)
end

end

end
4 changes: 2 additions & 2 deletions lib/active_guide/group.rb
Expand Up @@ -2,7 +2,7 @@ module ActiveGuide
class Group < Item

attr_reader :items

def initialize(group, name, options = {}, &block)
super group, name, options
@items = []
Expand Down Expand Up @@ -37,6 +37,6 @@ def test(name, *args, &block)
def add_item(item)
@items << item
end

end
end
2 changes: 1 addition & 1 deletion lib/active_guide/item.rb
Expand Up @@ -29,7 +29,7 @@ def after(&block)
raise "Missing block" unless block_given?
@after_block = block
end

end

end
2 changes: 1 addition & 1 deletion lib/active_guide/result.rb
Expand Up @@ -2,7 +2,7 @@ module ActiveGuide
class Result

attr_reader :group, :name, :type

def initialize(group, name, type = :numeric)
@group = group
@name = name
Expand Down
6 changes: 3 additions & 3 deletions lib/active_guide/simple_analyzer.rb
Expand Up @@ -73,7 +73,7 @@ def analyze_test(test, env, depth = 0)
results[:passed] += 1
else
results[:failed] += 1
end
end
log_result(env, test.name, r, depth)
end
end
Expand Down Expand Up @@ -121,15 +121,15 @@ def log_result(env, message, passed, depth = 0)
end
return passed
end

def log_group(env, message, depth = 0)
return unless env.verbose
if depth >= 0
prefix = " " * depth
puts "#{(prefix + message.to_s.humanize).yellow}"
end
end

end

end
4 changes: 2 additions & 2 deletions lib/active_guide/test.rb
Expand Up @@ -20,7 +20,7 @@ def subtest?
def validate?
!subtest?
end

def subtest(name, *args, &block)
if @validate_block.present?
raise "Validation has been already defined in #{@name}"
Expand All @@ -43,7 +43,7 @@ def validate(&block)
end
@validate_block = block
end

end

end
2 changes: 1 addition & 1 deletion test/lib/active_guide_test.rb
Expand Up @@ -25,7 +25,7 @@ class ActiveGuideTest < ActiveSupport::TestCase
end
end
end
group :tests_2 do
group :tests_2 do
test :thing_5_quality do
subtest :thin_a, Proc.new { true }
subtest :thin_b, Proc.new { rand(100) > 30 }
Expand Down

0 comments on commit bb72ca2

Please sign in to comment.