elabs_matchers 0.0.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.
Files changed (48) hide show
  1. data/.gitignore +4 -0
  2. data/.rvmrc +1 -0
  3. data/Gemfile +4 -0
  4. data/Gemfile.lock +61 -0
  5. data/README.rdoc +45 -0
  6. data/Rakefile +17 -0
  7. data/doc/ElabsMatchers.html +106 -0
  8. data/doc/ElabsMatchers/Matchers.html +93 -0
  9. data/doc/ElabsMatchers/Matchers/Capybara.html +81 -0
  10. data/doc/ElabsMatchers/Matchers/Rspec.html +81 -0
  11. data/doc/_index.html +140 -0
  12. data/doc/class_list.html +36 -0
  13. data/doc/css/common.css +1 -0
  14. data/doc/css/full_list.css +53 -0
  15. data/doc/css/style.css +318 -0
  16. data/doc/file.README.html +102 -0
  17. data/doc/file_list.html +38 -0
  18. data/doc/frames.html +13 -0
  19. data/doc/index.html +102 -0
  20. data/doc/js/app.js +203 -0
  21. data/doc/js/full_list.js +149 -0
  22. data/doc/js/jquery.js +16 -0
  23. data/doc/method_list.html +35 -0
  24. data/doc/top-level-namespace.html +88 -0
  25. data/elabs_matchers.gemspec +27 -0
  26. data/lib/elabs_matchers.rb +19 -0
  27. data/lib/elabs_matchers/cucumber/common.rb +57 -0
  28. data/lib/elabs_matchers/helpers/capybara.rb +24 -0
  29. data/lib/elabs_matchers/helpers/common.rb +27 -0
  30. data/lib/elabs_matchers/helpers/fixtures.rb +21 -0
  31. data/lib/elabs_matchers/helpers/orm.rb +32 -0
  32. data/lib/elabs_matchers/helpers/session.rb +26 -0
  33. data/lib/elabs_matchers/matchers/capybara/common.rb +200 -0
  34. data/lib/elabs_matchers/matchers/rspec/common.rb +59 -0
  35. data/lib/elabs_matchers/matchers/rspec/orm.rb +29 -0
  36. data/lib/elabs_matchers/orm/post.rb +27 -0
  37. data/lib/elabs_matchers/version.rb +3 -0
  38. data/spec/elabs_matchers/cucumber/common_spec.rb +49 -0
  39. data/spec/elabs_matchers/helpers/capybara_spec.rb +32 -0
  40. data/spec/elabs_matchers/helpers/common_spec.rb +25 -0
  41. data/spec/elabs_matchers/helpers/fixtures_spec.rb +9 -0
  42. data/spec/elabs_matchers/helpers/orm_spec.rb +22 -0
  43. data/spec/elabs_matchers/matchers/capybara/common_spec.rb +202 -0
  44. data/spec/elabs_matchers/matchers/rspec/common_spec.rb +74 -0
  45. data/spec/elabs_matchers/matchers/rspec/orm_spec.rb +16 -0
  46. data/spec/fixtures/file.txt +1 -0
  47. data/spec/spec_helper.rb +11 -0
  48. metadata +192 -0
@@ -0,0 +1,4 @@
1
+ pkg/*
2
+ *.gem
3
+ .bundle
4
+ .yardoc
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm --create use default@elabs_matchers
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in elabs_matchers.gemspec
4
+ gemspec
@@ -0,0 +1,61 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ elabs_matchers (0.0.1)
5
+
6
+ GEM
7
+ remote: http://rubygems.org/
8
+ specs:
9
+ activesupport (3.0.8)
10
+ capybara (0.4.1.2)
11
+ celerity (>= 0.7.9)
12
+ culerity (>= 0.2.4)
13
+ mime-types (>= 1.16)
14
+ nokogiri (>= 1.3.3)
15
+ rack (>= 1.0.0)
16
+ rack-test (>= 0.5.4)
17
+ selenium-webdriver (>= 0.0.27)
18
+ xpath (~> 0.1.3)
19
+ celerity (0.8.8)
20
+ childprocess (0.1.8)
21
+ ffi (~> 1.0.6)
22
+ culerity (0.2.15)
23
+ diff-lcs (1.1.2)
24
+ ffi (1.0.7)
25
+ rake (>= 0.8.7)
26
+ i18n (0.6.0)
27
+ json_pure (1.5.1)
28
+ mime-types (1.16)
29
+ nokogiri (1.4.4)
30
+ rack (1.2.2)
31
+ rack-test (0.5.7)
32
+ rack (>= 1.0)
33
+ rake (0.8.7)
34
+ rspec (2.5.0)
35
+ rspec-core (~> 2.5.0)
36
+ rspec-expectations (~> 2.5.0)
37
+ rspec-mocks (~> 2.5.0)
38
+ rspec-core (2.5.1)
39
+ rspec-expectations (2.5.0)
40
+ diff-lcs (~> 1.1.2)
41
+ rspec-mocks (2.5.0)
42
+ rubyzip (0.9.4)
43
+ selenium-webdriver (0.1.4)
44
+ childprocess (>= 0.1.7)
45
+ ffi (>= 1.0.7)
46
+ json_pure
47
+ rubyzip
48
+ xpath (0.1.3)
49
+ nokogiri (~> 1.3)
50
+ yard (0.6.5)
51
+
52
+ PLATFORMS
53
+ ruby
54
+
55
+ DEPENDENCIES
56
+ activesupport
57
+ capybara
58
+ elabs_matchers!
59
+ i18n
60
+ rspec
61
+ yard
@@ -0,0 +1,45 @@
1
+ = Elabs matchers
2
+
3
+ A collection of useful rspec matchers
4
+
5
+ == Installation
6
+
7
+ Install the gem with bundler:
8
+
9
+ gem install bundler
10
+
11
+ add gem 'elabs_matchers' to your Gemfile
12
+
13
+ bundle install
14
+
15
+
16
+ == TODOS
17
+ * Make yard document rspec matchers
18
+ * Use matcher with RSpec::Matchers:DSL
19
+ * Remove Rspec warning
20
+ * Add contributors
21
+
22
+ == License:
23
+
24
+ (The MIT License)
25
+
26
+ Copyright (c) 2011 Elabs AB
27
+
28
+ Permission is hereby granted, free of charge, to any person obtaining
29
+ a copy of this software and associated documentation files (the
30
+ 'Software'), to deal in the Software without restriction, including
31
+ without limitation the rights to use, copy, modify, merge, publish,
32
+ distribute, sublicense, and/or sell copies of the Software, and to
33
+ permit persons to whom the Software is furnished to do so, subject to
34
+ the following conditions:
35
+
36
+ The above copyright notice and this permission notice shall be
37
+ included in all copies or substantial portions of the Software.
38
+
39
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
40
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
41
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
42
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
43
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
44
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
45
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,17 @@
1
+ require 'bundler'
2
+ require 'rubygems'
3
+ require 'rspec/core/rake_task'
4
+ require 'yard'
5
+
6
+ Bundler::GemHelper.install_tasks
7
+
8
+ desc "Run all examples"
9
+ RSpec::Core::RakeTask.new(:spec) do |t|
10
+ t.rspec_opts = %w[--color]
11
+ end
12
+
13
+ YARD::Rake::YardocTask.new do |t|
14
+ t.files = ['lib/**/*.rb', 'README.rdoc']
15
+ end
16
+
17
+ task :default => :spec
@@ -0,0 +1,106 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>Module: ElabsMatchers</title>
7
+ <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
8
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
9
+
10
+ <script type="text/javascript" charset="utf-8">
11
+ relpath = '';
12
+ if (relpath != '') relpath += '/';
13
+ </script>
14
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
15
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
16
+
17
+ </head>
18
+ <body>
19
+ <script type="text/javascript" charset="utf-8">
20
+ if (window.top.frames.main) document.body.className = 'frames';
21
+ </script>
22
+
23
+ <div id="header">
24
+ <div id="menu">
25
+
26
+ <a href="_index.html">Index (E)</a> &raquo;
27
+
28
+
29
+ <span class="title">ElabsMatchers</span>
30
+
31
+
32
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
33
+ </div>
34
+
35
+ <div id="search">
36
+ <a id="class_list_link" href="#">Class List</a>
37
+ <a id="method_list_link" href="#">Method List</a>
38
+ <a id ="file_list_link" href="#">File List</a>
39
+ </div>
40
+
41
+ <div class="clear"></div>
42
+ </div>
43
+
44
+ <iframe id="search_frame"></iframe>
45
+
46
+ <div id="content"><h1>Module: ElabsMatchers
47
+
48
+
49
+
50
+ </h1>
51
+
52
+ <dl class="box">
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+ <dt class="r1 last">Defined in:</dt>
62
+ <dd class="r1 last">lib/elabs_matchers.rb<span class="defines">,<br />
63
+ lib/elabs_matchers/version.rb,<br /> lib/elabs_matchers/matchers/rspec/common.rb,<br /> lib/elabs_matchers/matchers/capybara/common.rb</span>
64
+ </dd>
65
+
66
+ </dl>
67
+ <div class="clear"></div>
68
+
69
+ <h2>Defined Under Namespace</h2>
70
+ <p class="children">
71
+
72
+
73
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="ElabsMatchers/Matchers.html" title="ElabsMatchers::Matchers (module)">Matchers</a></span>
74
+
75
+
76
+
77
+
78
+ </p>
79
+
80
+ <h2>Constant Summary</h2>
81
+
82
+ <dl class="constants">
83
+
84
+ <dt id="VERSION-constant" class="">VERSION =
85
+
86
+ </dt>
87
+ <dd><pre class="code"><span class='string val'>&quot;0.0.1&quot;</span>
88
+ </pre></dd>
89
+
90
+ </dl>
91
+
92
+
93
+
94
+
95
+
96
+
97
+ </div>
98
+
99
+ <div id="footer">
100
+ Generated on Wed Jun 15 10:20:45 2011 by
101
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
102
+ 0.6.5 (ruby-1.8.7).
103
+ </div>
104
+
105
+ </body>
106
+ </html>
@@ -0,0 +1,93 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>Module: ElabsMatchers::Matchers</title>
7
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
8
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
9
+
10
+ <script type="text/javascript" charset="utf-8">
11
+ relpath = '..';
12
+ if (relpath != '') relpath += '/';
13
+ </script>
14
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
15
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
16
+
17
+ </head>
18
+ <body>
19
+ <script type="text/javascript" charset="utf-8">
20
+ if (window.top.frames.main) document.body.className = 'frames';
21
+ </script>
22
+
23
+ <div id="header">
24
+ <div id="menu">
25
+
26
+ <a href="../_index.html">Index (M)</a> &raquo;
27
+ <span class='title'><span class='object_link'><a href="../ElabsMatchers.html" title="ElabsMatchers (module)">ElabsMatchers</a></span></span>
28
+ &raquo;
29
+ <span class="title">Matchers</span>
30
+
31
+
32
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
33
+ </div>
34
+
35
+ <div id="search">
36
+ <a id="class_list_link" href="#">Class List</a>
37
+ <a id="method_list_link" href="#">Method List</a>
38
+ <a id ="file_list_link" href="#">File List</a>
39
+ </div>
40
+
41
+ <div class="clear"></div>
42
+ </div>
43
+
44
+ <iframe id="search_frame"></iframe>
45
+
46
+ <div id="content"><h1>Module: ElabsMatchers::Matchers
47
+
48
+
49
+
50
+ </h1>
51
+
52
+ <dl class="box">
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+ <dt class="r1 last">Defined in:</dt>
62
+ <dd class="r1 last">lib/elabs_matchers/matchers/rspec/common.rb<span class="defines">,<br />
63
+ lib/elabs_matchers/matchers/capybara/common.rb</span>
64
+ </dd>
65
+
66
+ </dl>
67
+ <div class="clear"></div>
68
+
69
+ <h2>Defined Under Namespace</h2>
70
+ <p class="children">
71
+
72
+
73
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="Matchers/Capybara.html" title="ElabsMatchers::Matchers::Capybara (module)">Capybara</a></span>, <span class='object_link'><a href="Matchers/Rspec.html" title="ElabsMatchers::Matchers::Rspec (module)">Rspec</a></span>
74
+
75
+
76
+
77
+
78
+ </p>
79
+
80
+
81
+
82
+
83
+
84
+ </div>
85
+
86
+ <div id="footer">
87
+ Generated on Wed Jun 15 10:20:45 2011 by
88
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
89
+ 0.6.5 (ruby-1.8.7).
90
+ </div>
91
+
92
+ </body>
93
+ </html>
@@ -0,0 +1,81 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>Module: ElabsMatchers::Matchers::Capybara</title>
7
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
8
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
9
+
10
+ <script type="text/javascript" charset="utf-8">
11
+ relpath = '../..';
12
+ if (relpath != '') relpath += '/';
13
+ </script>
14
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
15
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
16
+
17
+ </head>
18
+ <body>
19
+ <script type="text/javascript" charset="utf-8">
20
+ if (window.top.frames.main) document.body.className = 'frames';
21
+ </script>
22
+
23
+ <div id="header">
24
+ <div id="menu">
25
+
26
+ <a href="../../_index.html">Index (C)</a> &raquo;
27
+ <span class='title'><span class='object_link'><a href="../../ElabsMatchers.html" title="ElabsMatchers (module)">ElabsMatchers</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Matchers.html" title="ElabsMatchers::Matchers (module)">Matchers</a></span></span>
28
+ &raquo;
29
+ <span class="title">Capybara</span>
30
+
31
+
32
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
33
+ </div>
34
+
35
+ <div id="search">
36
+ <a id="class_list_link" href="#">Class List</a>
37
+ <a id="method_list_link" href="#">Method List</a>
38
+ <a id ="file_list_link" href="#">File List</a>
39
+ </div>
40
+
41
+ <div class="clear"></div>
42
+ </div>
43
+
44
+ <iframe id="search_frame"></iframe>
45
+
46
+ <div id="content"><h1>Module: ElabsMatchers::Matchers::Capybara
47
+
48
+
49
+
50
+ </h1>
51
+
52
+ <dl class="box">
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+ <dt class="r1 last">Defined in:</dt>
62
+ <dd class="r1 last">lib/elabs_matchers/matchers/capybara/common.rb</dd>
63
+
64
+ </dl>
65
+ <div class="clear"></div>
66
+
67
+
68
+
69
+
70
+
71
+
72
+ </div>
73
+
74
+ <div id="footer">
75
+ Generated on Wed Jun 15 10:20:45 2011 by
76
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
77
+ 0.6.5 (ruby-1.8.7).
78
+ </div>
79
+
80
+ </body>
81
+ </html>
@@ -0,0 +1,81 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>Module: ElabsMatchers::Matchers::Rspec</title>
7
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
8
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
9
+
10
+ <script type="text/javascript" charset="utf-8">
11
+ relpath = '../..';
12
+ if (relpath != '') relpath += '/';
13
+ </script>
14
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
15
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
16
+
17
+ </head>
18
+ <body>
19
+ <script type="text/javascript" charset="utf-8">
20
+ if (window.top.frames.main) document.body.className = 'frames';
21
+ </script>
22
+
23
+ <div id="header">
24
+ <div id="menu">
25
+
26
+ <a href="../../_index.html">Index (R)</a> &raquo;
27
+ <span class='title'><span class='object_link'><a href="../../ElabsMatchers.html" title="ElabsMatchers (module)">ElabsMatchers</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Matchers.html" title="ElabsMatchers::Matchers (module)">Matchers</a></span></span>
28
+ &raquo;
29
+ <span class="title">Rspec</span>
30
+
31
+
32
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
33
+ </div>
34
+
35
+ <div id="search">
36
+ <a id="class_list_link" href="#">Class List</a>
37
+ <a id="method_list_link" href="#">Method List</a>
38
+ <a id ="file_list_link" href="#">File List</a>
39
+ </div>
40
+
41
+ <div class="clear"></div>
42
+ </div>
43
+
44
+ <iframe id="search_frame"></iframe>
45
+
46
+ <div id="content"><h1>Module: ElabsMatchers::Matchers::Rspec
47
+
48
+
49
+
50
+ </h1>
51
+
52
+ <dl class="box">
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+ <dt class="r1 last">Defined in:</dt>
62
+ <dd class="r1 last">lib/elabs_matchers/matchers/rspec/common.rb</dd>
63
+
64
+ </dl>
65
+ <div class="clear"></div>
66
+
67
+
68
+
69
+
70
+
71
+
72
+ </div>
73
+
74
+ <div id="footer">
75
+ Generated on Wed Jun 15 10:20:45 2011 by
76
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
77
+ 0.6.5 (ruby-1.8.7).
78
+ </div>
79
+
80
+ </body>
81
+ </html>