motion-spec 0.4.0 → 0.4.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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZGVhMjk5MWRlZGU0NTEwMDNkMmQ1YTQxYzA3NGU0NGI5MjMwMjk5Nw==
4
+ ZWEzMDBlZmMyYjFkMmQyMTJkZDQ1YjE4MTE4N2U4NjMxM2Q1ZmJhMQ==
5
5
  data.tar.gz: !binary |-
6
- NTNiZTMwZTMyMDFjY2ZlNDcyYjNhOTJlZDM4OGI1NTdiNTgzOTYxZA==
6
+ YzJkMzFjNGQ0MjkyNmQzMTQ5YjZlNmI0YWZiNTNhZjZiY2FhN2FkMA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ODdiODllYjUyODFkNzhkODM2MTY1MjQ1MDA4NmZlZWExZTA4YjU3MmYxZWRh
10
- ZDJjMWQyOGYyYjNkNzk1NTNlMTJkYTY4YTY2YWExYzY0YjQwZDFiZGNiYjM1
11
- YjE2OTE2ZjU3OTk2NmU5MzJhMmEzYjJkN2Y5MmFmMjdkMGIxNDQ=
9
+ N2YwZmZlNmIzODNjZTQwNjVkNmZhMmJiYzlkNGEwMjE0YmJjM2Q3YTYyZTAz
10
+ NWY3MTkzMDIyNWY2MTYxOTYwNjY1ZTk0Njc3NzI0OGQzZWJmNDYzMjIxZDFm
11
+ NDQ4Y2U2YTY1NzZjNjY1ODFiMDgxNjkzMzBmMjU1YWFjOTNjMmY=
12
12
  data.tar.gz: !binary |-
13
- MWIzZDdjNjI5ODhlOWIwMmNlNzQyZTg3YWQ5MzNjYTM0MjEzNzMxNDhlY2Qy
14
- YjQ3MjMyMjQ1NTg3OGM2YmFiOWNhZDdjMzdiOTY0MGJkYzNiMjZkZDIxZWRh
15
- ODg0MmFhNzQ1ODU2M2YxYjE2ZjE3NmU3YTQ1OWNkNjMwMDdiYjQ=
13
+ YTlmMTIyNGJlNjNhMTRjNTE0ZTBlMzI4YjRkNzg3MDFkY2Y0ZmM1MmIwNzhh
14
+ Y2U2MzQwMjQ2MzM2N2VjZjdlZTMwODIxM2UyODYyNDAwYjJjNDdmOWVmOGFk
15
+ NzEzNTJkMGIyM2VlYmFiY2U1OTdiM2EzNjJiMTEwZjFhZTRhYTA=
data/.gitignore CHANGED
@@ -27,9 +27,9 @@ build/
27
27
 
28
28
  # for a library or gem, you might want to ignore these files since the code is
29
29
  # intended to run in multiple environments; otherwise, check them in:
30
- # Gemfile.lock
31
- # .ruby-version
32
- # .ruby-gemset
30
+ Gemfile.lock
31
+ .ruby-version
32
+ .ruby-gemset
33
33
 
34
34
  # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
35
35
  .rvmrc
data/README.md CHANGED
@@ -14,23 +14,47 @@ of `Bacon` which is a simplified version of `rspec`).
14
14
 
15
15
  ## Installation
16
16
 
17
- Add this line to your application's Gemfile:
17
+ Add this line to your app's `Gemfile`:
18
18
 
19
19
  ```ruby
20
20
  gem 'motion-spec'
21
21
  ```
22
22
 
23
- And then execute:
23
+ If your `Rakefile` includes this line you're all set:
24
24
 
25
- $ bundle
25
+ ```ruby
26
+ Bundler.require
27
+ ```
26
28
 
27
- Or install it yourself as:
29
+ Otherwise, you'll need to add this line to the top of your `Rakefile`:
28
30
 
29
- $ gem install motion-spec
31
+ ```ruby
32
+ require 'motion-spec'
33
+ ```
30
34
 
31
35
  ## Usage
32
36
 
33
- TODO: Write usage instructions here
37
+ ### By Example
38
+
39
+ ```ruby
40
+ describe AwesomeClass do
41
+ it 'initializes with defaults' do
42
+ expect(AwesomeClass.new.attribute).to eq 'my default'
43
+ end
44
+
45
+ it { expect(true).to be_true }
46
+
47
+ context 'with a precondition' do
48
+ before { AwesomeClass.build_context }
49
+ after { AwesomeClass.reset_all }
50
+
51
+ let(:example_1) { AwesomeClass.new(foo: 'bar') }
52
+ subject { example_1.instance_function }
53
+
54
+ it { is_expected.to have_foo('bar') }
55
+ end
56
+ end
57
+ ```
34
58
 
35
59
  ## Contributing
36
60
 
@@ -81,12 +81,6 @@ module MotionSpec
81
81
  )
82
82
  end
83
83
 
84
- def should(*args, &block)
85
- return it('should ' + args.first, &block) if Counter[:depth] == 0
86
-
87
- super(*args, &block)
88
- end
89
-
90
84
  def describe(*args, &block)
91
85
  context = MotionSpec::Context.new("#{@name} #{args.join(' ')}", @before, @after, &block)
92
86
 
@@ -0,0 +1,9 @@
1
+ # -*- encoding : utf-8 -*-
2
+
3
+ # There are gems (e.g. motion-stump) that rely on Bacon or some of its
4
+ # sub-modules to exist so they can extend them. This file ensures that
5
+ # MotionSpec can be used alongside those gems but may break some functionality.
6
+ module Bacon
7
+ class Context < MotionSpec::Context
8
+ end
9
+ end
@@ -1,5 +1,5 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
 
3
3
  module MotionSpec
4
- VERSION = '0.4.0'
4
+ VERSION = '0.4.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-spec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Bender
@@ -51,7 +51,6 @@ files:
51
51
  - .rubocop.yml
52
52
  - .travis.yml
53
53
  - Gemfile
54
- - Gemfile.lock
55
54
  - LICENSE
56
55
  - README.md
57
56
  - Rakefile
@@ -65,6 +64,7 @@ files:
65
64
  - lib/motion-spec/core.rb
66
65
  - lib/motion-spec/error.rb
67
66
  - lib/motion-spec/expectation.rb
67
+ - lib/motion-spec/extensions/bacon.rb
68
68
  - lib/motion-spec/extensions/boolean.rb
69
69
  - lib/motion-spec/extensions/exception.rb
70
70
  - lib/motion-spec/extensions/kernel.rb
data/Gemfile.lock DELETED
@@ -1,21 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- motion-spec (0.4.0)
5
- motion-require (>= 0.0.6)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- motion-require (0.2.0)
11
- rake (10.4.2)
12
-
13
- PLATFORMS
14
- ruby
15
-
16
- DEPENDENCIES
17
- motion-spec!
18
- rake (~> 10.0)
19
-
20
- BUNDLED WITH
21
- 1.10.5