peck 0.2.0 → 0.2.1

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/lib/peck/context.rb CHANGED
@@ -55,8 +55,8 @@ class Peck
55
55
  end
56
56
 
57
57
  def describe(*description, &block)
58
- if Peck.context_selector.match(Peck.join_description(*description))
59
- init(@before, @after, *description, &block)
58
+ if Peck.context_selector.match(Peck.join_description(@description + description))
59
+ init(@before, @after, *(@description + description), &block)
60
60
  end
61
61
  end
62
62
 
@@ -130,7 +130,6 @@ end
130
130
 
131
131
  class Object
132
132
  def should(*args, &block)
133
- # TODO: raise argument error when .should.should
134
133
  if self.kind_of?(Class) && (self < Peck::Context)
135
134
  Peck::Should::Specification.new(self)
136
135
  else
@@ -28,7 +28,14 @@ class Peck
28
28
  def write_exeception(number, event)
29
29
  puts " #{number}) #{event.spec.label}\n\n"
30
30
  backtrace = clean_backtrace(event.exception.backtrace)
31
- puts " #{event.exception.message}\n\n\t#{backtrace.join("\n\t")}\n\n"
31
+
32
+ parts = []
33
+ unless event.exception.message.nil? || event.exception.message == ''
34
+ parts << " #{event.exception.message}"
35
+ end
36
+ parts << "\t#{backtrace.join("\n\t")}"
37
+ parts << nil
38
+ puts parts.join("\n\n")
32
39
  end
33
40
 
34
41
  def write_event(number, event)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peck
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-28 00:00:00.000000000 Z
12
+ date: 2013-07-08 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! ' Concurrent spec framework.
15
15