dummy_test_pattern 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/Rakefile +2 -0
- data/dummy_test_pattern.gemspec +17 -0
- data/lib/dummy_test_pattern/all.rb +2 -0
- data/lib/dummy_test_pattern/mongo_mapper.rb +24 -0
- data/lib/dummy_test_pattern/stalker.rb +9 -0
- data/lib/dummy_test_pattern/version.rb +3 -0
- data/lib/dummy_test_pattern.rb +6 -0
- data/spec/dummy_spec.rb +36 -0
- metadata +57 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/dummy_test_pattern/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Senthil A"]
|
6
|
+
gem.email = ["senthil196@gmail.com"]
|
7
|
+
gem.description = %q{Dummy testing pattern helper gem.}
|
8
|
+
gem.summary = %q{Dummy testing pattern helper gem.}
|
9
|
+
gem.homepage = ""
|
10
|
+
|
11
|
+
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
12
|
+
gem.files = `git ls-files`.split("\n")
|
13
|
+
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
14
|
+
gem.name = "dummy_test_pattern"
|
15
|
+
gem.require_paths = ["lib"]
|
16
|
+
gem.version = DummyTestPattern::VERSION
|
17
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module DummyTestPattern
|
2
|
+
module MongoMapper
|
3
|
+
def self.database=(name)
|
4
|
+
end
|
5
|
+
|
6
|
+
module Document
|
7
|
+
def self.included(mod)
|
8
|
+
mod.extend ClassMethods
|
9
|
+
end
|
10
|
+
|
11
|
+
module ClassMethods
|
12
|
+
def key(name, type)
|
13
|
+
attr_accessor name
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def save
|
18
|
+
self
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
MongoMapper = DummyTestPattern::MongoMapper
|
data/spec/dummy_spec.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'dummy_test_pattern/all'
|
2
|
+
|
3
|
+
describe DummyTestPattern do
|
4
|
+
context 'Stalker' do
|
5
|
+
it 'enqueue' do
|
6
|
+
lambda do
|
7
|
+
Stalker.enqueue('job')
|
8
|
+
end.should_not raise_error
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
context 'MongoMapper' do
|
13
|
+
before(:all) do
|
14
|
+
Post = Class.new do
|
15
|
+
include MongoMapper::Document
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'key' do
|
20
|
+
lambda do
|
21
|
+
Post.key(:name, String)
|
22
|
+
end.should_not raise_error
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'save (returns self)' do
|
26
|
+
p = Post.new
|
27
|
+
p.save.should == p
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'database='do
|
31
|
+
lambda do
|
32
|
+
MongoMapper.database = 'hello'
|
33
|
+
end.should_not raise_error
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
metadata
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: dummy_test_pattern
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.4
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Senthil A
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-12-29 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description: Dummy testing pattern helper gem.
|
15
|
+
email:
|
16
|
+
- senthil196@gmail.com
|
17
|
+
executables: []
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- .gitignore
|
22
|
+
- Gemfile
|
23
|
+
- Rakefile
|
24
|
+
- dummy_test_pattern.gemspec
|
25
|
+
- lib/dummy_test_pattern.rb
|
26
|
+
- lib/dummy_test_pattern/all.rb
|
27
|
+
- lib/dummy_test_pattern/mongo_mapper.rb
|
28
|
+
- lib/dummy_test_pattern/stalker.rb
|
29
|
+
- lib/dummy_test_pattern/version.rb
|
30
|
+
- spec/dummy_spec.rb
|
31
|
+
homepage: ''
|
32
|
+
licenses: []
|
33
|
+
post_install_message:
|
34
|
+
rdoc_options: []
|
35
|
+
require_paths:
|
36
|
+
- lib
|
37
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
38
|
+
none: false
|
39
|
+
requirements:
|
40
|
+
- - ! '>='
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '0'
|
43
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
44
|
+
none: false
|
45
|
+
requirements:
|
46
|
+
- - ! '>='
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
requirements: []
|
50
|
+
rubyforge_project:
|
51
|
+
rubygems_version: 1.8.5
|
52
|
+
signing_key:
|
53
|
+
specification_version: 3
|
54
|
+
summary: Dummy testing pattern helper gem.
|
55
|
+
test_files:
|
56
|
+
- spec/dummy_spec.rb
|
57
|
+
has_rdoc:
|