example_group_timer 0.0.1 → 0.0.2

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/README.md CHANGED
@@ -56,7 +56,7 @@ Add these lines to your application's Gemfile:
56
56
 
57
57
  And then execute:
58
58
 
59
- $ bundle
59
+ $ bundle install
60
60
 
61
61
  Or install it yourself as:
62
62
 
@@ -64,13 +64,25 @@ Or install it yourself as:
64
64
 
65
65
  ## Usage
66
66
 
67
- From the command line or in your `.rspec` file, if you have added it to your Gemfile:
67
+ From the command line or in your `.rspec` file, just specify the formatter:
68
68
 
69
- bundle exec rspec -f ExampleGroupTimer::Formatter
69
+ rspec -f ExampleGroupTimer::Formatter
70
70
 
71
- If installed manually, you will need to require the gem first:
71
+ Or, create a special Rake task for it:
72
72
 
73
- rspec -r example_group_timer -f ExampleGroupTimer::Formatter
73
+ #!/usr/bin/env rake
74
+ task default: :spec
75
+
76
+ require 'rspec/core/rake_task'
77
+ RSpec::Core::RakeTask.new
78
+ namespace :spec do
79
+ RSpec::Core::RakeTask.new(:timed) do |t|
80
+ t.rspec_opts = '--format ExampleGroupTimer::Formatter'
81
+ end
82
+ end
83
+
84
+ Now you can run your specs as usual with `rake spec`, but with the timing
85
+ behaviour using `rake spec:timed`.
74
86
 
75
87
  ## Contributing
76
88
 
@@ -1,3 +1,5 @@
1
+ require File.expand_path('../../example_group_timer', __FILE__)
2
+
1
3
  module ExampleGroupTimer
2
4
  class Formatter < RSpec::Core::Formatters::ProgressFormatter
3
5
  attr_reader :groups
@@ -1,3 +1,3 @@
1
1
  module ExampleGroupTimer
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
@@ -3,6 +3,7 @@ require 'example_group_timer/version'
3
3
  require 'example_group_timer/timed_item'
4
4
  require 'example_group_timer/timed_group'
5
5
  require 'example_group_timer/root_timed_group'
6
+ require 'example_group_timer/formatter'
6
7
 
7
8
  module ExampleGroupTimer
8
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: example_group_timer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
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-29 00:00:00.000000000 Z
12
+ date: 2012-09-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake