rspec-illustrate 0.1.2 → 0.1.3

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/Rakefile CHANGED
@@ -11,4 +11,5 @@ RSpec::Core::RakeTask.new(:html) do |t|
11
11
  t.rspec_opts = "--format RSpec::Formatters::IllustratedHtmlFormatter --out ./doc/specs.html"
12
12
  end
13
13
 
14
+ task :test => :spec
14
15
  task :default => :spec
@@ -0,0 +1,24 @@
1
+ RSpec::Support.require_rspec_core "formatters/json_formatter"
2
+ require 'rspec/formatters/illustration_formatter.rb'
3
+
4
+ module RSpec
5
+ module Formatters
6
+ include RSpec::Core::Formatters
7
+
8
+ # An extension to the {RSpec::Core::Formatters::JsonFormatter} that
9
+ # includes the illustrations for each example.
10
+ class IllustratedJsonFormatter < JsonFormatter
11
+ include RSpec::Formatters
12
+
13
+ RSpec::Core::Formatters.register self, :message, :dump_summary, :dump_profile, :stop, :close
14
+
15
+ # @see RSpec::Core::Formatters::JsonFormatter#format_example
16
+ def format_example(example)
17
+ hash = super
18
+ hash[:illustrations] = example.metadata[:illustrations] || []
19
+ hash
20
+ end
21
+ end
22
+ end
23
+ end
24
+
@@ -1,6 +1,6 @@
1
1
  module RSpec
2
2
  module Illustrate
3
3
  # The version used by gemspec
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-illustrate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
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: 2015-03-19 00:00:00.000000000 Z
12
+ date: 2015-03-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec-core
@@ -92,6 +92,7 @@ files:
92
92
  - bin/setup
93
93
  - lib/rspec/formatters/illustrated_documentation_formatter.rb
94
94
  - lib/rspec/formatters/illustrated_html_formatter.rb
95
+ - lib/rspec/formatters/illustrated_json_formatter.rb
95
96
  - lib/rspec/formatters/illustration_formatter.rb
96
97
  - lib/rspec/illustrate.rb
97
98
  - lib/rspec/illustrate/version.rb
@@ -117,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
118
  version: '0'
118
119
  segments:
119
120
  - 0
120
- hash: 2396350347062895824
121
+ hash: 3602209029501457242
121
122
  requirements: []
122
123
  rubyforge_project:
123
124
  rubygems_version: 1.8.23