dummy_test_pattern 0.0.4

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/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'http://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in dummy_test_pattern.gemspec
4
+ gemspec
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
@@ -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,2 @@
1
+ require 'dummy_test_pattern/stalker'
2
+ require 'dummy_test_pattern/mongo_mapper'
@@ -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
@@ -0,0 +1,9 @@
1
+ module DummyTestPattern
2
+ module Stalker
3
+ def self.enqueue(job, hash={})
4
+ 'dummy stalker job'
5
+ end
6
+ end
7
+ end
8
+
9
+ Stalker = DummyTestPattern::Stalker
@@ -0,0 +1,3 @@
1
+ module DummyTestPattern
2
+ VERSION = "0.0.4"
3
+ end
@@ -0,0 +1,6 @@
1
+ require 'dummy_test_pattern/stalker'
2
+ require 'dummy_test_pattern/mongo_mapper'
3
+ require "dummy_test_pattern/version"
4
+
5
+ module DummyTestPattern
6
+ end
@@ -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: