jay_z 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,7 +9,7 @@ module JayZ
9
9
  # admin { false }
10
10
  # end
11
11
  #
12
- # set(:admin) do
12
+ # define(:admin) do
13
13
  # admin { true }
14
14
  # end
15
15
  # end
@@ -22,7 +22,7 @@ module JayZ
22
22
  end
23
23
  end
24
24
 
25
- def set(method, &block)
25
+ def define(method, &block)
26
26
  ghosts[method] = Ghost.new(serial_number).instance_eval(&block)
27
27
  self.class.send(:define_method, method) do |options={}|
28
28
  hash = options.merge({})
data/lib/jay_z/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module JayZ
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -49,9 +49,9 @@ describe JayZ::Blueprint do
49
49
  end
50
50
  end
51
51
 
52
- describe ".set" do
52
+ describe ".define" do
53
53
  before do
54
- JayZ::Comment.set(:admin) do
54
+ JayZ::Comment.define(:admin) do
55
55
  user { JayZ::User.make(:name => 'Anders Admin').new }
56
56
  end
57
57
  end
@@ -79,17 +79,17 @@ describe JayZ::Blueprint do
79
79
  user { User.make(:name => 'Anders Default').new }
80
80
  body { 'I am defined in default' }
81
81
  end
82
- JayZ::Comment.set(:spam) do
82
+ JayZ::Comment.define(:spam) do
83
83
  user { User.make(:name => 'Anders Spam').new }
84
84
  end
85
85
  end
86
86
 
87
- describe "when .set(:spam) has not defined the method in its block" do
87
+ describe "when .define(:spam) has not defined the method in its block" do
88
88
  it "returns the body defined in the default block" do
89
89
  JayZ::Comment.spam[:body].must_equal 'I am defined in default'
90
90
  end
91
91
  end
92
- describe "when .set(:spam) has defined the method in its block" do
92
+ describe "when .define(:spam) has defined the method in its block" do
93
93
  it "returns the value from the spam block" do
94
94
  JayZ::Comment.spam[:user].name.must_equal 'Anders Spam'
95
95
  end
@@ -101,7 +101,7 @@ describe JayZ::Blueprint do
101
101
  JayZ::User.default do
102
102
  name { "User #{sn}" }
103
103
  end
104
- JayZ::User.set(:admin) do
104
+ JayZ::User.define(:admin) do
105
105
  name { "Admin #{sn}" }
106
106
  end
107
107
  end
data/spec/jay_z_spec.rb CHANGED
@@ -9,7 +9,7 @@ module JayZ
9
9
  body { "I am a default post body" }
10
10
  end
11
11
 
12
- set(:video) do
12
+ define(:video) do
13
13
  writer { Writer.make(:name => 'Anders defined in Blog.video').save }
14
14
  url { 'http://www.youtube.com/watch?v=g5950v0kTJg' }
15
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jay_z
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-10-07 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
16
- requirement: &70165095778160 !ruby/object:Gem::Requirement
16
+ requirement: &70286611593460 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.1.0
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70165095778160
24
+ version_requirements: *70286611593460
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: railties
27
- requirement: &70165095777520 !ruby/object:Gem::Requirement
27
+ requirement: &70286611592500 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 3.1.0
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70165095777520
35
+ version_requirements: *70286611592500
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sqlite3
38
- requirement: &70165095776660 !ruby/object:Gem::Requirement
38
+ requirement: &70286611591800 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: 1.3.4
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70165095776660
46
+ version_requirements: *70286611591800
47
47
  description: A model factory. Say no to fixtures.
48
48
  email:
49
49
  - anders.tornqvist@gmail.com