should_pricot 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. data/MIT-LICENSE +1 -1
  2. data/Rakefile +0 -13
  3. data/VERSION +1 -0
  4. data/lib/should_pricot/test_helper_methods.rb +21 -0
  5. data/lib/should_pricot.rb +8 -19
  6. data/test/should_pricot_test.rb +5 -0
  7. data/test/test_helper.rb +8 -25
  8. metadata +21 -114
  9. data/Manifest +0 -92
  10. data/should_pricot.gemspec +0 -31
  11. data/tasks/should_pricot_tasks.rake +0 -4
  12. data/test/fixtures/posts.yml +0 -4
  13. data/test/fixtures/users.yml +0 -9
  14. data/test/functional/users_controller_test.rb +0 -16
  15. data/test/test-app/app/controllers/application_controller.rb +0 -10
  16. data/test/test-app/app/controllers/users_controller.rb +0 -40
  17. data/test/test-app/app/helpers/application_helper.rb +0 -3
  18. data/test/test-app/app/models/post.rb +0 -3
  19. data/test/test-app/app/models/user.rb +0 -7
  20. data/test/test-app/app/views/users/edit.html.erb +0 -0
  21. data/test/test-app/app/views/users/index.html.erb +0 -9
  22. data/test/test-app/app/views/users/new.html.erb +0 -0
  23. data/test/test-app/config/boot.rb +0 -110
  24. data/test/test-app/config/database.yml +0 -4
  25. data/test/test-app/config/environment.rb +0 -12
  26. data/test/test-app/config/environments/test.rb +0 -0
  27. data/test/test-app/config/initializers/funktional.rb +0 -8
  28. data/test/test-app/config/initializers/new_rails_defaults.rb +0 -21
  29. data/test/test-app/config/routes.rb +0 -5
  30. data/test/test-app/db/migrate/001_create_users.rb +0 -18
  31. data/test/test-app/db/migrate/002_create_posts.rb +0 -13
  32. data/test/test-app/public/404.html +0 -30
  33. data/test/test-app/public/422.html +0 -30
  34. data/test/test-app/public/500.html +0 -30
  35. data/test/test-app/script/console +0 -3
  36. data/test/test-app/script/generate +0 -3
  37. data/test/test-app/vendor/plugins/funktional/MIT-LICENSE +0 -20
  38. data/test/test-app/vendor/plugins/funktional/README.rdoc +0 -289
  39. data/test/test-app/vendor/plugins/funktional/Rakefile +0 -23
  40. data/test/test-app/vendor/plugins/funktional/init.rb +0 -8
  41. data/test/test-app/vendor/plugins/funktional/install.rb +0 -1
  42. data/test/test-app/vendor/plugins/funktional/lib/funktional/assertion.rb +0 -9
  43. data/test/test-app/vendor/plugins/funktional/lib/funktional/assigned_assertion.rb +0 -39
  44. data/test/test-app/vendor/plugins/funktional/lib/funktional/attribute_test_helper.rb +0 -27
  45. data/test/test-app/vendor/plugins/funktional/lib/funktional/context/assigned_should_block.rb +0 -32
  46. data/test/test-app/vendor/plugins/funktional/lib/funktional/context/collector.rb +0 -21
  47. data/test/test-app/vendor/plugins/funktional/lib/funktional/context/count_should_block.rb +0 -21
  48. data/test/test-app/vendor/plugins/funktional/lib/funktional/context/delegating_should_block.rb +0 -30
  49. data/test/test-app/vendor/plugins/funktional/lib/funktional/context/element_should_block.rb +0 -29
  50. data/test/test-app/vendor/plugins/funktional/lib/funktional/context/flashed_should_block.rb +0 -17
  51. data/test/test-app/vendor/plugins/funktional/lib/funktional/context/should_block.rb +0 -60
  52. data/test/test-app/vendor/plugins/funktional/lib/funktional/context/should_create_block.rb +0 -17
  53. data/test/test-app/vendor/plugins/funktional/lib/funktional/context/should_delete_block.rb +0 -17
  54. data/test/test-app/vendor/plugins/funktional/lib/funktional/context/should_not_block.rb +0 -20
  55. data/test/test-app/vendor/plugins/funktional/lib/funktional/context/should_not_create_block.rb +0 -17
  56. data/test/test-app/vendor/plugins/funktional/lib/funktional/context/should_not_delete_block.rb +0 -17
  57. data/test/test-app/vendor/plugins/funktional/lib/funktional/context/should_not_send_email_block.rb +0 -18
  58. data/test/test-app/vendor/plugins/funktional/lib/funktional/context/stack_recorder.rb +0 -34
  59. data/test/test-app/vendor/plugins/funktional/lib/funktional/context.rb +0 -126
  60. data/test/test-app/vendor/plugins/funktional/lib/funktional/email_assertion.rb +0 -50
  61. data/test/test-app/vendor/plugins/funktional/lib/funktional/flashed_assertion.rb +0 -12
  62. data/test/test-app/vendor/plugins/funktional/lib/funktional/model_assertions.rb +0 -108
  63. data/test/test-app/vendor/plugins/funktional/lib/funktional/random_characters.rb +0 -11
  64. data/test/test-app/vendor/plugins/funktional/lib/funktional/recursive_assertion.rb +0 -23
  65. data/test/test-app/vendor/plugins/funktional/lib/funktional/route_checker.rb +0 -49
  66. data/test/test-app/vendor/plugins/funktional/lib/funktional/setup.rb +0 -11
  67. data/test/test-app/vendor/plugins/funktional/lib/funktional/test_class_methods.rb +0 -28
  68. data/test/test-app/vendor/plugins/funktional/lib/funktional/test_instance_methods.rb +0 -131
  69. data/test/test-app/vendor/plugins/funktional/lib/funktional.rb +0 -41
  70. data/test/test-app/vendor/plugins/funktional/tasks/should_b_tasks.rake +0 -4
  71. data/test/test-app/vendor/plugins/funktional/test/fixtures/posts.yml +0 -4
  72. data/test/test-app/vendor/plugins/funktional/test/fixtures/users.yml +0 -5
  73. data/test/test-app/vendor/plugins/funktional/test/test-app/app/controllers/application_controller.rb +0 -10
  74. data/test/test-app/vendor/plugins/funktional/test/test-app/app/helpers/application_helper.rb +0 -3
  75. data/test/test-app/vendor/plugins/funktional/test/test-app/app/models/post.rb +0 -3
  76. data/test/test-app/vendor/plugins/funktional/test/test-app/app/models/user.rb +0 -7
  77. data/test/test-app/vendor/plugins/funktional/test/test-app/config/boot.rb +0 -110
  78. data/test/test-app/vendor/plugins/funktional/test/test-app/config/database.yml +0 -4
  79. data/test/test-app/vendor/plugins/funktional/test/test-app/config/environment.rb +0 -12
  80. data/test/test-app/vendor/plugins/funktional/test/test-app/config/environments/test.rb +0 -0
  81. data/test/test-app/vendor/plugins/funktional/test/test-app/config/initializers/funktional.rb +0 -8
  82. data/test/test-app/vendor/plugins/funktional/test/test-app/config/initializers/new_rails_defaults.rb +0 -21
  83. data/test/test-app/vendor/plugins/funktional/test/test-app/config/routes.rb +0 -4
  84. data/test/test-app/vendor/plugins/funktional/test/test-app/db/migrate/001_create_users.rb +0 -18
  85. data/test/test-app/vendor/plugins/funktional/test/test-app/db/migrate/002_create_posts.rb +0 -13
  86. data/test/test-app/vendor/plugins/funktional/test/test-app/public/404.html +0 -30
  87. data/test/test-app/vendor/plugins/funktional/test/test-app/public/422.html +0 -30
  88. data/test/test-app/vendor/plugins/funktional/test/test-app/public/500.html +0 -30
  89. data/test/test-app/vendor/plugins/funktional/test/test-app/script/console +0 -3
  90. data/test/test-app/vendor/plugins/funktional/test/test-app/script/generate +0 -3
  91. data/test/test-app/vendor/plugins/funktional/test/test_helper.rb +0 -27
  92. data/test/test-app/vendor/plugins/funktional/test/unit/user_test.rb +0 -12
  93. data/test/test-app/vendor/plugins/funktional/uninstall.rb +0 -1
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2009 [name of plugin creator]
1
+ Copyright (c) 2009 [Brent Greeff]
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/Rakefile CHANGED
@@ -1,8 +1,6 @@
1
- require 'rubygems'
2
1
  require 'rake'
3
2
  require 'rake/testtask'
4
3
  require 'rake/rdoctask'
5
- require 'echoe'
6
4
 
7
5
  desc 'Default: run unit tests.'
8
6
  task :default => :test
@@ -23,14 +21,3 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
23
21
  rdoc.rdoc_files.include('README')
24
22
  rdoc.rdoc_files.include('lib/**/*.rb')
25
23
  end
26
-
27
- Echoe.new('should_pricot', '1.0.0') do |p|
28
- p.description = "Hpricot powered html testing"
29
- p.url = "http://github.com/brentgreeff/should_pricot"
30
- p.author = "Brent Greeff"
31
- p.email = ""
32
- p.ignore_pattern = ["init.rb", "install.rb", "uninstall.rb"]
33
- p.development_dependencies = []
34
- end
35
-
36
- Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].sort.each { |ext| load ext }
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 2.0.0
@@ -0,0 +1,21 @@
1
+ module ShouldPricot
2
+ module TestHelperMethods
3
+
4
+ def element(selector, passed_html = nil)
5
+ @passed_html = passed_html
6
+ ElementAssertion.new(selector, get_html, self)
7
+ end
8
+
9
+ def count(selector, passed_html = nil)
10
+ @passed_html = passed_html
11
+ CountAssertion.new(selector, get_html, self)
12
+ end
13
+
14
+ private
15
+
16
+ def get_html
17
+ return Hpricot(@passed_html) if @passed_html
18
+ @html || @html = Hpricot(@response.body)
19
+ end
20
+ end
21
+ end
data/lib/should_pricot.rb CHANGED
@@ -1,19 +1,8 @@
1
- module ShouldPricot
2
-
3
- def element(selector, passed_html = nil)
4
- @passed_html = passed_html
5
- ElementAssertion.new(selector, get_html, self)
6
- end
7
-
8
- def count(selector, passed_html = nil)
9
- @passed_html = passed_html
10
- CountAssertion.new(selector, get_html, self)
11
- end
12
-
13
- private
14
-
15
- def get_html
16
- return Hpricot(@passed_html) if @passed_html
17
- @html || @html = Hpricot(@response.body)
18
- end
19
- end
1
+ require 'test_help'
2
+ require 'hpricot'
3
+
4
+ require File.join(File.dirname(__FILE__), "should_pricot", "count_assertion")
5
+ require File.join(File.dirname(__FILE__), "should_pricot", "element_assertion")
6
+ require File.join(File.dirname(__FILE__), "should_pricot", "test_helper_methods")
7
+
8
+ ActiveSupport::TestCase.send(:include, ShouldPricot::TestHelperMethods)
@@ -2,5 +2,10 @@ require File.dirname(__FILE__) + '/test_helper.rb'
2
2
 
3
3
  class ShouldPricotTest < ActionController::TestCase
4
4
 
5
+ private
6
+
7
+ def deny(expected_to_be_false, message = '')
8
+ assert ! expected_to_be_false, message
9
+ end
5
10
 
6
11
  end
data/test/test_helper.rb CHANGED
@@ -1,30 +1,13 @@
1
- require 'fileutils'
1
+ require 'rubygems'
2
+ require 'active_support'
3
+ require 'active_support/test_case'
4
+ require 'test/unit'
2
5
 
3
- # Load the environment
4
6
  ENV['RAILS_ENV'] = 'test'
7
+ ENV['RAILS_ROOT'] ||= File.dirname(__FILE__) + '/../../../..'
5
8
 
6
- test_app = File.dirname(__FILE__) + '/test-app'
9
+ require File.expand_path(File.join(ENV['RAILS_ROOT'], 'config/environment.rb'))
7
10
 
8
- require "#{test_app}/config/environment.rb"
11
+ ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/debug.log")
9
12
 
10
- # Load the testing framework
11
- require 'test_help'
12
- silence_warnings { RAILS_ENV = ENV['RAILS_ENV'] }
13
-
14
- # Run the migrations
15
- ActiveRecord::Migration.verbose = false
16
- ActiveRecord::Migrator.migrate("#{Rails.root}/db/migrate")
17
-
18
- # Setup the fixtures path
19
- ActiveSupport::TestCase.fixture_path = File.join(File.dirname(__FILE__), "fixtures")
20
-
21
- class ActiveSupport::TestCase #:nodoc:
22
- setup :funktional
23
-
24
- self.use_transactional_fixtures = false
25
- self.use_instantiated_fixtures = false
26
- end
27
-
28
- def deny(expected_to_be_false, message = '')
29
- assert ! expected_to_be_false, message
30
- end
13
+ require File.dirname(__FILE__) + '/../rails/init.rb'
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: should_pricot
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 15
4
5
  prerelease: false
5
6
  segments:
6
- - 1
7
+ - 2
7
8
  - 0
8
9
  - 0
9
- version: 1.0.0
10
+ version: 2.0.0
10
11
  platform: ruby
11
12
  authors:
12
13
  - Brent Greeff
@@ -14,157 +15,63 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-03-07 00:00:00 +00:00
18
+ date: 2010-10-30 00:00:00 +01:00
18
19
  default_executable:
19
20
  dependencies: []
20
21
 
21
- description: Hpricot powered html testing
22
- email: ""
22
+ description: Rails testing assertions for checking your html is generated correctly.
23
+ email: email@brentgreeff.com
23
24
  executables: []
24
25
 
25
26
  extensions: []
26
27
 
27
28
  extra_rdoc_files:
29
+ - MIT-LICENSE
28
30
  - README.rdoc
29
- - lib/should_pricot.rb
30
- - lib/should_pricot/count_assertion.rb
31
- - lib/should_pricot/element_assertion.rb
32
- - tasks/should_pricot_tasks.rake
33
31
  files:
34
32
  - MIT-LICENSE
35
33
  - README.rdoc
36
34
  - Rakefile
35
+ - VERSION
37
36
  - lib/should_pricot.rb
38
37
  - lib/should_pricot/count_assertion.rb
39
38
  - lib/should_pricot/element_assertion.rb
40
- - tasks/should_pricot_tasks.rake
41
- - test/fixtures/posts.yml
42
- - test/fixtures/users.yml
43
- - test/functional/users_controller_test.rb
39
+ - lib/should_pricot/test_helper_methods.rb
44
40
  - test/should_pricot_test.rb
45
- - test/test-app/app/controllers/application_controller.rb
46
- - test/test-app/app/controllers/users_controller.rb
47
- - test/test-app/app/helpers/application_helper.rb
48
- - test/test-app/app/models/post.rb
49
- - test/test-app/app/models/user.rb
50
- - test/test-app/app/views/users/edit.html.erb
51
- - test/test-app/app/views/users/index.html.erb
52
- - test/test-app/app/views/users/new.html.erb
53
- - test/test-app/config/boot.rb
54
- - test/test-app/config/database.yml
55
- - test/test-app/config/environment.rb
56
- - test/test-app/config/environments/test.rb
57
- - test/test-app/config/initializers/funktional.rb
58
- - test/test-app/config/initializers/new_rails_defaults.rb
59
- - test/test-app/config/routes.rb
60
- - test/test-app/db/migrate/001_create_users.rb
61
- - test/test-app/db/migrate/002_create_posts.rb
62
- - test/test-app/public/404.html
63
- - test/test-app/public/422.html
64
- - test/test-app/public/500.html
65
- - test/test-app/script/console
66
- - test/test-app/script/generate
67
- - test/test-app/vendor/plugins/funktional/MIT-LICENSE
68
- - test/test-app/vendor/plugins/funktional/README.rdoc
69
- - test/test-app/vendor/plugins/funktional/Rakefile
70
- - test/test-app/vendor/plugins/funktional/init.rb
71
- - test/test-app/vendor/plugins/funktional/install.rb
72
- - test/test-app/vendor/plugins/funktional/lib/funktional.rb
73
- - test/test-app/vendor/plugins/funktional/lib/funktional/assertion.rb
74
- - test/test-app/vendor/plugins/funktional/lib/funktional/assigned_assertion.rb
75
- - test/test-app/vendor/plugins/funktional/lib/funktional/attribute_test_helper.rb
76
- - test/test-app/vendor/plugins/funktional/lib/funktional/context.rb
77
- - test/test-app/vendor/plugins/funktional/lib/funktional/context/assigned_should_block.rb
78
- - test/test-app/vendor/plugins/funktional/lib/funktional/context/collector.rb
79
- - test/test-app/vendor/plugins/funktional/lib/funktional/context/count_should_block.rb
80
- - test/test-app/vendor/plugins/funktional/lib/funktional/context/delegating_should_block.rb
81
- - test/test-app/vendor/plugins/funktional/lib/funktional/context/element_should_block.rb
82
- - test/test-app/vendor/plugins/funktional/lib/funktional/context/flashed_should_block.rb
83
- - test/test-app/vendor/plugins/funktional/lib/funktional/context/should_block.rb
84
- - test/test-app/vendor/plugins/funktional/lib/funktional/context/should_create_block.rb
85
- - test/test-app/vendor/plugins/funktional/lib/funktional/context/should_delete_block.rb
86
- - test/test-app/vendor/plugins/funktional/lib/funktional/context/should_not_block.rb
87
- - test/test-app/vendor/plugins/funktional/lib/funktional/context/should_not_create_block.rb
88
- - test/test-app/vendor/plugins/funktional/lib/funktional/context/should_not_delete_block.rb
89
- - test/test-app/vendor/plugins/funktional/lib/funktional/context/should_not_send_email_block.rb
90
- - test/test-app/vendor/plugins/funktional/lib/funktional/context/stack_recorder.rb
91
- - test/test-app/vendor/plugins/funktional/lib/funktional/email_assertion.rb
92
- - test/test-app/vendor/plugins/funktional/lib/funktional/flashed_assertion.rb
93
- - test/test-app/vendor/plugins/funktional/lib/funktional/model_assertions.rb
94
- - test/test-app/vendor/plugins/funktional/lib/funktional/random_characters.rb
95
- - test/test-app/vendor/plugins/funktional/lib/funktional/recursive_assertion.rb
96
- - test/test-app/vendor/plugins/funktional/lib/funktional/route_checker.rb
97
- - test/test-app/vendor/plugins/funktional/lib/funktional/setup.rb
98
- - test/test-app/vendor/plugins/funktional/lib/funktional/test_class_methods.rb
99
- - test/test-app/vendor/plugins/funktional/lib/funktional/test_instance_methods.rb
100
- - test/test-app/vendor/plugins/funktional/tasks/should_b_tasks.rake
101
- - test/test-app/vendor/plugins/funktional/test/fixtures/posts.yml
102
- - test/test-app/vendor/plugins/funktional/test/fixtures/users.yml
103
- - test/test-app/vendor/plugins/funktional/test/test-app/app/controllers/application_controller.rb
104
- - test/test-app/vendor/plugins/funktional/test/test-app/app/helpers/application_helper.rb
105
- - test/test-app/vendor/plugins/funktional/test/test-app/app/models/post.rb
106
- - test/test-app/vendor/plugins/funktional/test/test-app/app/models/user.rb
107
- - test/test-app/vendor/plugins/funktional/test/test-app/config/boot.rb
108
- - test/test-app/vendor/plugins/funktional/test/test-app/config/database.yml
109
- - test/test-app/vendor/plugins/funktional/test/test-app/config/environment.rb
110
- - test/test-app/vendor/plugins/funktional/test/test-app/config/environments/test.rb
111
- - test/test-app/vendor/plugins/funktional/test/test-app/config/initializers/funktional.rb
112
- - test/test-app/vendor/plugins/funktional/test/test-app/config/initializers/new_rails_defaults.rb
113
- - test/test-app/vendor/plugins/funktional/test/test-app/config/routes.rb
114
- - test/test-app/vendor/plugins/funktional/test/test-app/db/migrate/001_create_users.rb
115
- - test/test-app/vendor/plugins/funktional/test/test-app/db/migrate/002_create_posts.rb
116
- - test/test-app/vendor/plugins/funktional/test/test-app/public/404.html
117
- - test/test-app/vendor/plugins/funktional/test/test-app/public/422.html
118
- - test/test-app/vendor/plugins/funktional/test/test-app/public/500.html
119
- - test/test-app/vendor/plugins/funktional/test/test-app/script/console
120
- - test/test-app/vendor/plugins/funktional/test/test-app/script/generate
121
- - test/test-app/vendor/plugins/funktional/test/test_helper.rb
122
- - test/test-app/vendor/plugins/funktional/test/unit/user_test.rb
123
- - test/test-app/vendor/plugins/funktional/uninstall.rb
124
41
  - test/test_helper.rb
125
- - Manifest
126
- - should_pricot.gemspec
127
42
  has_rdoc: true
128
43
  homepage: http://github.com/brentgreeff/should_pricot
129
44
  licenses: []
130
45
 
131
46
  post_install_message:
132
47
  rdoc_options:
133
- - --line-numbers
134
- - --inline-source
135
- - --title
136
- - Should_pricot
137
- - --main
138
- - README.rdoc
48
+ - --charset=UTF-8
139
49
  require_paths:
140
50
  - lib
141
51
  required_ruby_version: !ruby/object:Gem::Requirement
52
+ none: false
142
53
  requirements:
143
54
  - - ">="
144
55
  - !ruby/object:Gem::Version
56
+ hash: 3
145
57
  segments:
146
58
  - 0
147
59
  version: "0"
148
60
  required_rubygems_version: !ruby/object:Gem::Requirement
61
+ none: false
149
62
  requirements:
150
63
  - - ">="
151
64
  - !ruby/object:Gem::Version
65
+ hash: 3
152
66
  segments:
153
- - 1
154
- - 2
155
- version: "1.2"
67
+ - 0
68
+ version: "0"
156
69
  requirements: []
157
70
 
158
- rubyforge_project: should_pricot
159
- rubygems_version: 1.3.6
71
+ rubyforge_project:
72
+ rubygems_version: 1.3.7
160
73
  signing_key:
161
74
  specification_version: 3
162
- summary: Hpricot powered html testing
163
- test_files:
164
- - test/functional/users_controller_test.rb
165
- - test/should_pricot_test.rb
166
- - test/test-app/vendor/plugins/funktional/lib/funktional/test_class_methods.rb
167
- - test/test-app/vendor/plugins/funktional/lib/funktional/test_instance_methods.rb
168
- - test/test-app/vendor/plugins/funktional/test/test_helper.rb
169
- - test/test-app/vendor/plugins/funktional/test/unit/user_test.rb
170
- - test/test_helper.rb
75
+ summary: Rails testing assertions for checking your html is generated correctly.
76
+ test_files: []
77
+
data/Manifest DELETED
@@ -1,92 +0,0 @@
1
- MIT-LICENSE
2
- Manifest
3
- README.rdoc
4
- Rakefile
5
- lib/should_pricot.rb
6
- lib/should_pricot/count_assertion.rb
7
- lib/should_pricot/element_assertion.rb
8
- tasks/should_pricot_tasks.rake
9
- test/fixtures/posts.yml
10
- test/fixtures/users.yml
11
- test/functional/users_controller_test.rb
12
- test/should_pricot_test.rb
13
- test/test-app/app/controllers/application_controller.rb
14
- test/test-app/app/controllers/users_controller.rb
15
- test/test-app/app/helpers/application_helper.rb
16
- test/test-app/app/models/post.rb
17
- test/test-app/app/models/user.rb
18
- test/test-app/app/views/users/edit.html.erb
19
- test/test-app/app/views/users/index.html.erb
20
- test/test-app/app/views/users/new.html.erb
21
- test/test-app/config/boot.rb
22
- test/test-app/config/database.yml
23
- test/test-app/config/environment.rb
24
- test/test-app/config/environments/test.rb
25
- test/test-app/config/initializers/funktional.rb
26
- test/test-app/config/initializers/new_rails_defaults.rb
27
- test/test-app/config/routes.rb
28
- test/test-app/db/migrate/001_create_users.rb
29
- test/test-app/db/migrate/002_create_posts.rb
30
- test/test-app/public/404.html
31
- test/test-app/public/422.html
32
- test/test-app/public/500.html
33
- test/test-app/script/console
34
- test/test-app/script/generate
35
- test/test-app/vendor/plugins/funktional/MIT-LICENSE
36
- test/test-app/vendor/plugins/funktional/README.rdoc
37
- test/test-app/vendor/plugins/funktional/Rakefile
38
- test/test-app/vendor/plugins/funktional/init.rb
39
- test/test-app/vendor/plugins/funktional/install.rb
40
- test/test-app/vendor/plugins/funktional/lib/funktional.rb
41
- test/test-app/vendor/plugins/funktional/lib/funktional/assertion.rb
42
- test/test-app/vendor/plugins/funktional/lib/funktional/assigned_assertion.rb
43
- test/test-app/vendor/plugins/funktional/lib/funktional/attribute_test_helper.rb
44
- test/test-app/vendor/plugins/funktional/lib/funktional/context.rb
45
- test/test-app/vendor/plugins/funktional/lib/funktional/context/assigned_should_block.rb
46
- test/test-app/vendor/plugins/funktional/lib/funktional/context/collector.rb
47
- test/test-app/vendor/plugins/funktional/lib/funktional/context/count_should_block.rb
48
- test/test-app/vendor/plugins/funktional/lib/funktional/context/delegating_should_block.rb
49
- test/test-app/vendor/plugins/funktional/lib/funktional/context/element_should_block.rb
50
- test/test-app/vendor/plugins/funktional/lib/funktional/context/flashed_should_block.rb
51
- test/test-app/vendor/plugins/funktional/lib/funktional/context/should_block.rb
52
- test/test-app/vendor/plugins/funktional/lib/funktional/context/should_create_block.rb
53
- test/test-app/vendor/plugins/funktional/lib/funktional/context/should_delete_block.rb
54
- test/test-app/vendor/plugins/funktional/lib/funktional/context/should_not_block.rb
55
- test/test-app/vendor/plugins/funktional/lib/funktional/context/should_not_create_block.rb
56
- test/test-app/vendor/plugins/funktional/lib/funktional/context/should_not_delete_block.rb
57
- test/test-app/vendor/plugins/funktional/lib/funktional/context/should_not_send_email_block.rb
58
- test/test-app/vendor/plugins/funktional/lib/funktional/context/stack_recorder.rb
59
- test/test-app/vendor/plugins/funktional/lib/funktional/email_assertion.rb
60
- test/test-app/vendor/plugins/funktional/lib/funktional/flashed_assertion.rb
61
- test/test-app/vendor/plugins/funktional/lib/funktional/model_assertions.rb
62
- test/test-app/vendor/plugins/funktional/lib/funktional/random_characters.rb
63
- test/test-app/vendor/plugins/funktional/lib/funktional/recursive_assertion.rb
64
- test/test-app/vendor/plugins/funktional/lib/funktional/route_checker.rb
65
- test/test-app/vendor/plugins/funktional/lib/funktional/setup.rb
66
- test/test-app/vendor/plugins/funktional/lib/funktional/test_class_methods.rb
67
- test/test-app/vendor/plugins/funktional/lib/funktional/test_instance_methods.rb
68
- test/test-app/vendor/plugins/funktional/tasks/should_b_tasks.rake
69
- test/test-app/vendor/plugins/funktional/test/fixtures/posts.yml
70
- test/test-app/vendor/plugins/funktional/test/fixtures/users.yml
71
- test/test-app/vendor/plugins/funktional/test/test-app/app/controllers/application_controller.rb
72
- test/test-app/vendor/plugins/funktional/test/test-app/app/helpers/application_helper.rb
73
- test/test-app/vendor/plugins/funktional/test/test-app/app/models/post.rb
74
- test/test-app/vendor/plugins/funktional/test/test-app/app/models/user.rb
75
- test/test-app/vendor/plugins/funktional/test/test-app/config/boot.rb
76
- test/test-app/vendor/plugins/funktional/test/test-app/config/database.yml
77
- test/test-app/vendor/plugins/funktional/test/test-app/config/environment.rb
78
- test/test-app/vendor/plugins/funktional/test/test-app/config/environments/test.rb
79
- test/test-app/vendor/plugins/funktional/test/test-app/config/initializers/funktional.rb
80
- test/test-app/vendor/plugins/funktional/test/test-app/config/initializers/new_rails_defaults.rb
81
- test/test-app/vendor/plugins/funktional/test/test-app/config/routes.rb
82
- test/test-app/vendor/plugins/funktional/test/test-app/db/migrate/001_create_users.rb
83
- test/test-app/vendor/plugins/funktional/test/test-app/db/migrate/002_create_posts.rb
84
- test/test-app/vendor/plugins/funktional/test/test-app/public/404.html
85
- test/test-app/vendor/plugins/funktional/test/test-app/public/422.html
86
- test/test-app/vendor/plugins/funktional/test/test-app/public/500.html
87
- test/test-app/vendor/plugins/funktional/test/test-app/script/console
88
- test/test-app/vendor/plugins/funktional/test/test-app/script/generate
89
- test/test-app/vendor/plugins/funktional/test/test_helper.rb
90
- test/test-app/vendor/plugins/funktional/test/unit/user_test.rb
91
- test/test-app/vendor/plugins/funktional/uninstall.rb
92
- test/test_helper.rb
@@ -1,31 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
- Gem::Specification.new do |s|
4
- s.name = %q{should_pricot}
5
- s.version = "1.0.0"
6
-
7
- s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
- s.authors = ["Brent Greeff"]
9
- s.date = %q{2010-03-07}
10
- s.description = %q{Hpricot powered html testing}
11
- s.email = %q{}
12
- s.extra_rdoc_files = ["README.rdoc", "lib/should_pricot.rb", "lib/should_pricot/count_assertion.rb", "lib/should_pricot/element_assertion.rb", "tasks/should_pricot_tasks.rake"]
13
- s.files = ["MIT-LICENSE", "README.rdoc", "Rakefile", "lib/should_pricot.rb", "lib/should_pricot/count_assertion.rb", "lib/should_pricot/element_assertion.rb", "tasks/should_pricot_tasks.rake", "test/fixtures/posts.yml", "test/fixtures/users.yml", "test/functional/users_controller_test.rb", "test/should_pricot_test.rb", "test/test-app/app/controllers/application_controller.rb", "test/test-app/app/controllers/users_controller.rb", "test/test-app/app/helpers/application_helper.rb", "test/test-app/app/models/post.rb", "test/test-app/app/models/user.rb", "test/test-app/app/views/users/edit.html.erb", "test/test-app/app/views/users/index.html.erb", "test/test-app/app/views/users/new.html.erb", "test/test-app/config/boot.rb", "test/test-app/config/database.yml", "test/test-app/config/environment.rb", "test/test-app/config/environments/test.rb", "test/test-app/config/initializers/funktional.rb", "test/test-app/config/initializers/new_rails_defaults.rb", "test/test-app/config/routes.rb", "test/test-app/db/migrate/001_create_users.rb", "test/test-app/db/migrate/002_create_posts.rb", "test/test-app/public/404.html", "test/test-app/public/422.html", "test/test-app/public/500.html", "test/test-app/script/console", "test/test-app/script/generate", "test/test-app/vendor/plugins/funktional/MIT-LICENSE", "test/test-app/vendor/plugins/funktional/README.rdoc", "test/test-app/vendor/plugins/funktional/Rakefile", "test/test-app/vendor/plugins/funktional/init.rb", "test/test-app/vendor/plugins/funktional/install.rb", "test/test-app/vendor/plugins/funktional/lib/funktional.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/assertion.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/assigned_assertion.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/attribute_test_helper.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/context.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/context/assigned_should_block.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/context/collector.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/context/count_should_block.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/context/delegating_should_block.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/context/element_should_block.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/context/flashed_should_block.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/context/should_block.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/context/should_create_block.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/context/should_delete_block.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/context/should_not_block.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/context/should_not_create_block.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/context/should_not_delete_block.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/context/should_not_send_email_block.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/context/stack_recorder.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/email_assertion.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/flashed_assertion.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/model_assertions.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/random_characters.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/recursive_assertion.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/route_checker.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/setup.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/test_class_methods.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/test_instance_methods.rb", "test/test-app/vendor/plugins/funktional/tasks/should_b_tasks.rake", "test/test-app/vendor/plugins/funktional/test/fixtures/posts.yml", "test/test-app/vendor/plugins/funktional/test/fixtures/users.yml", "test/test-app/vendor/plugins/funktional/test/test-app/app/controllers/application_controller.rb", "test/test-app/vendor/plugins/funktional/test/test-app/app/helpers/application_helper.rb", "test/test-app/vendor/plugins/funktional/test/test-app/app/models/post.rb", "test/test-app/vendor/plugins/funktional/test/test-app/app/models/user.rb", "test/test-app/vendor/plugins/funktional/test/test-app/config/boot.rb", "test/test-app/vendor/plugins/funktional/test/test-app/config/database.yml", "test/test-app/vendor/plugins/funktional/test/test-app/config/environment.rb", "test/test-app/vendor/plugins/funktional/test/test-app/config/environments/test.rb", "test/test-app/vendor/plugins/funktional/test/test-app/config/initializers/funktional.rb", "test/test-app/vendor/plugins/funktional/test/test-app/config/initializers/new_rails_defaults.rb", "test/test-app/vendor/plugins/funktional/test/test-app/config/routes.rb", "test/test-app/vendor/plugins/funktional/test/test-app/db/migrate/001_create_users.rb", "test/test-app/vendor/plugins/funktional/test/test-app/db/migrate/002_create_posts.rb", "test/test-app/vendor/plugins/funktional/test/test-app/public/404.html", "test/test-app/vendor/plugins/funktional/test/test-app/public/422.html", "test/test-app/vendor/plugins/funktional/test/test-app/public/500.html", "test/test-app/vendor/plugins/funktional/test/test-app/script/console", "test/test-app/vendor/plugins/funktional/test/test-app/script/generate", "test/test-app/vendor/plugins/funktional/test/test_helper.rb", "test/test-app/vendor/plugins/funktional/test/unit/user_test.rb", "test/test-app/vendor/plugins/funktional/uninstall.rb", "test/test_helper.rb", "Manifest", "should_pricot.gemspec"]
14
- s.homepage = %q{http://github.com/brentgreeff/should_pricot}
15
- s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Should_pricot", "--main", "README.rdoc"]
16
- s.require_paths = ["lib"]
17
- s.rubyforge_project = %q{should_pricot}
18
- s.rubygems_version = %q{1.3.6}
19
- s.summary = %q{Hpricot powered html testing}
20
- s.test_files = ["test/functional/users_controller_test.rb", "test/should_pricot_test.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/test_class_methods.rb", "test/test-app/vendor/plugins/funktional/lib/funktional/test_instance_methods.rb", "test/test-app/vendor/plugins/funktional/test/test_helper.rb", "test/test-app/vendor/plugins/funktional/test/unit/user_test.rb", "test/test_helper.rb"]
21
-
22
- if s.respond_to? :specification_version then
23
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
24
- s.specification_version = 3
25
-
26
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
27
- else
28
- end
29
- else
30
- end
31
- end
@@ -1,4 +0,0 @@
1
- # desc "Explaining what the task does"
2
- # task :should_pricot do
3
- # # Task goes here
4
- # end
@@ -1,4 +0,0 @@
1
- article:
2
- user: fred
3
- title: Article
4
- body: Some body text
@@ -1,9 +0,0 @@
1
- fred:
2
- name: fred
3
- email: fred@funktional.com
4
- phone: "01234567890"
5
- age: 35
6
-
7
- bob:
8
- name: bob
9
- email: bob@funktional.com
@@ -1,16 +0,0 @@
1
- require File.dirname(__FILE__) + '/../test_helper'
2
-
3
- class UsersControllerTest < ActionController::TestCase
4
-
5
- fixtures :all
6
-
7
- context "viewing user index" do
8
- before { get :index }
9
-
10
- count("#users li").should_be 2
11
- element("#users").should_be_present
12
- element("ul li:first").should_be "bob"
13
- element("ul li:nth(3)").should_be_missing
14
- element("section h1").should_contain /users/i
15
- end
16
- end
@@ -1,10 +0,0 @@
1
- # Filters added to this controller apply to all controllers in the application.
2
- # Likewise, all the methods added will be available for all controllers.
3
-
4
- class ApplicationController < ActionController::Base
5
- helper :all # include all helpers, all the time
6
- protect_from_forgery # See ActionController::RequestForgeryProtection for details
7
-
8
- # Scrub sensitive parameters from your log
9
- # filter_parameter_logging :password
10
- end
@@ -1,40 +0,0 @@
1
- class UsersController < ApplicationController
2
-
3
- def index
4
- @users = User.all
5
- end
6
-
7
- def new
8
- @user = User.new
9
- end
10
-
11
- def create
12
- @user = User.new(params[:user])
13
-
14
- if @user.save
15
- redirect_to users_url
16
- else
17
- flash[:error] = "Something went wrong"
18
- render :new
19
- end
20
- end
21
-
22
- def edit
23
- @user = User.find(params[:id])
24
- end
25
-
26
- def update
27
- @user = User.find(params[:id])
28
-
29
- @user.update_attributes(params[:user])
30
-
31
- redirect_to users_url
32
- end
33
-
34
- def destroy
35
- @user = User.find(params[:id])
36
-
37
- @user.destroy
38
- redirect_to users_url
39
- end
40
- end
@@ -1,3 +0,0 @@
1
- # Methods added to this helper will be available to all templates in the application.
2
- module ApplicationHelper
3
- end
@@ -1,3 +0,0 @@
1
- class Post < ActiveRecord::Base
2
- belongs_to :user
3
- end
@@ -1,7 +0,0 @@
1
- class User < ActiveRecord::Base
2
-
3
- has_many :posts
4
-
5
- validates_presence_of :name
6
-
7
- end
File without changes
@@ -1,9 +0,0 @@
1
- <section id="users">
2
- <h1>All Users</h1>
3
-
4
- <ul>
5
- <% for user in @users %>
6
- <li><%= user.name %></li>
7
- <% end -%>
8
- </ul>
9
- </section>
File without changes