smart_fixtures 0.0.2 → 0.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9bbac8f3ec0135d48c8936a1a5f251f1dd7015f2
4
- data.tar.gz: 019624a8efde410de89cc3fefabbfc916ba0f883
3
+ metadata.gz: 8a2394d92bd4dd8b5c8baca1238c8b0c3cbffe0e
4
+ data.tar.gz: 7a1e7b319114a7eccefa67a0bd8a7fc194a9b6ed
5
5
  SHA512:
6
- metadata.gz: 40b36b8748a1d36ec402e57151cb5a1fc680442a2b9bdd666d21d41179c67f9899024dc8d9ce407477ca36742dccdd5c277b3d80e0323e94894ce3ff20a92b87
7
- data.tar.gz: 093cc5b8fa46d080efc41a0b97dda44c321e8440efe94e903451ef0e73be487bee2cdc08033dfac67a01c6b89d1899ca5dfd75f468e5e4e852da2cc513a94eaa
6
+ metadata.gz: 8a35f55e8373fc3ba553e2f0624f7b1f3514ae110137a7bdc21b4fca8066d09f44730e3b55fe37b48616fb453f5ae39def7801fd4eb399502909794f4d54b690
7
+ data.tar.gz: 0ce6ff6ee042a5a2626f8996ea09baef6ee5ec7e488a0e03f878dc0cea3a205ef07135dbe20912067c6fd5b26247ad3f036141c00a54471dfc7178be40239da8
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
@@ -1,3 +1,3 @@
1
1
  module SmartFixtures
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["nishio@densan-labs.net"]
11
11
  spec.summary = %q{Smart Fixtures for Unit Testing}
12
12
  spec.description = %q{Smart Fixtures for Unit Testing}
13
- spec.homepage = ""
13
+ spec.homepage = "http://github.com/nishio-dens/smart_fixtures"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
@@ -0,0 +1,22 @@
1
+ require 'spec_helper'
2
+
3
+ SmartFixtures.define_dataset :smart_fixture_testdata do
4
+ let(:variable_test) { 'TESTVALUE' }
5
+ let(:concat_variable_test) { variable_test + 'TEST' }
6
+
7
+ fixture_local_variable = 'LOCAL VALUE'
8
+ let(:local_variable_test) { fixture_local_variable }
9
+ end
10
+
11
+ describe SmartFixtures do
12
+ smart_fixtures :smart_fixture_testdata, use_fixture_variables: true
13
+
14
+ it 'should be useable fixture value' do
15
+ expect(variable_test).to eq 'TESTVALUE'
16
+ expect(concat_variable_test).to eq 'TESTVALUETEST'
17
+ end
18
+
19
+ it 'should be useable fixture local value' do
20
+ expect(local_variable_test).to eq 'LOCAL VALUE'
21
+ end
22
+ end
@@ -0,0 +1,18 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+ require 'rspec'
4
+ require 'smart_fixtures'
5
+ Dir["#{File.dirname(__FILE__)}/integrations/**/*.rb"].each { |f| require f }
6
+
7
+ RSpec.configure do |config|
8
+ config.filter_run :focus
9
+ config.run_all_when_everything_filtered = true
10
+ end
11
+
12
+ module DatabaseRollbacker
13
+ class Rollbacker
14
+ def instance; self end
15
+ def save(args); true end
16
+ def rollback(args); true end
17
+ end
18
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_fixtures
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shinsuke Nishio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-26 00:00:00.000000000 Z
11
+ date: 2014-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: database_rollbacker
@@ -74,6 +74,7 @@ extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
76
  - .gitignore
77
+ - .rspec
77
78
  - Gemfile
78
79
  - LICENSE.txt
79
80
  - README.md
@@ -83,7 +84,9 @@ files:
83
84
  - lib/smart_fixtures/variable_set.rb
84
85
  - lib/smart_fixtures/version.rb
85
86
  - smart_fixtures.gemspec
86
- homepage: ''
87
+ - spec/smart_fixtures_spec.rb
88
+ - spec/spec_helper.rb
89
+ homepage: http://github.com/nishio-dens/smart_fixtures
87
90
  licenses:
88
91
  - MIT
89
92
  metadata: {}
@@ -107,4 +110,6 @@ rubygems_version: 2.0.14
107
110
  signing_key:
108
111
  specification_version: 4
109
112
  summary: Smart Fixtures for Unit Testing
110
- test_files: []
113
+ test_files:
114
+ - spec/smart_fixtures_spec.rb
115
+ - spec/spec_helper.rb