tpitale-shoulda 2.11.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CONTRIBUTION_GUIDELINES.rdoc +10 -0
- data/MIT-LICENSE +22 -0
- data/README.rdoc +171 -0
- data/Rakefile +71 -0
- data/bin/convert_to_should_syntax +42 -0
- data/lib/shoulda.rb +11 -0
- data/lib/shoulda/action_controller.rb +26 -0
- data/lib/shoulda/action_controller/macros.rb +240 -0
- data/lib/shoulda/action_controller/matchers.rb +37 -0
- data/lib/shoulda/action_controller/matchers/assign_to_matcher.rb +109 -0
- data/lib/shoulda/action_controller/matchers/filter_param_matcher.rb +57 -0
- data/lib/shoulda/action_controller/matchers/render_with_layout_matcher.rb +81 -0
- data/lib/shoulda/action_controller/matchers/respond_with_content_type_matcher.rb +74 -0
- data/lib/shoulda/action_controller/matchers/respond_with_matcher.rb +81 -0
- data/lib/shoulda/action_controller/matchers/route_matcher.rb +93 -0
- data/lib/shoulda/action_controller/matchers/set_session_matcher.rb +87 -0
- data/lib/shoulda/action_controller/matchers/set_the_flash_matcher.rb +85 -0
- data/lib/shoulda/action_mailer.rb +10 -0
- data/lib/shoulda/action_mailer/assertions.rb +38 -0
- data/lib/shoulda/action_view.rb +10 -0
- data/lib/shoulda/action_view/macros.rb +61 -0
- data/lib/shoulda/active_record.rb +16 -0
- data/lib/shoulda/active_record/assertions.rb +69 -0
- data/lib/shoulda/active_record/helpers.rb +27 -0
- data/lib/shoulda/active_record/macros.rb +512 -0
- data/lib/shoulda/active_record/matchers.rb +43 -0
- data/lib/shoulda/active_record/matchers/allow_mass_assignment_of_matcher.rb +83 -0
- data/lib/shoulda/active_record/matchers/allow_value_matcher.rb +102 -0
- data/lib/shoulda/active_record/matchers/association_matcher.rb +226 -0
- data/lib/shoulda/active_record/matchers/ensure_inclusion_of_matcher.rb +87 -0
- data/lib/shoulda/active_record/matchers/ensure_length_of_matcher.rb +141 -0
- data/lib/shoulda/active_record/matchers/have_db_column_matcher.rb +169 -0
- data/lib/shoulda/active_record/matchers/have_db_index_matcher.rb +112 -0
- data/lib/shoulda/active_record/matchers/have_named_scope_matcher.rb +128 -0
- data/lib/shoulda/active_record/matchers/have_readonly_attribute_matcher.rb +59 -0
- data/lib/shoulda/active_record/matchers/validate_acceptance_of_matcher.rb +41 -0
- data/lib/shoulda/active_record/matchers/validate_format_of_matcher.rb +67 -0
- data/lib/shoulda/active_record/matchers/validate_numericality_of_matcher.rb +39 -0
- data/lib/shoulda/active_record/matchers/validate_presence_of_matcher.rb +60 -0
- data/lib/shoulda/active_record/matchers/validate_uniqueness_of_matcher.rb +148 -0
- data/lib/shoulda/active_record/matchers/validation_matcher.rb +57 -0
- data/lib/shoulda/assertions.rb +71 -0
- data/lib/shoulda/autoload_macros.rb +46 -0
- data/lib/shoulda/context.rb +413 -0
- data/lib/shoulda/helpers.rb +8 -0
- data/lib/shoulda/macros.rb +133 -0
- data/lib/shoulda/minitest.rb +24 -0
- data/lib/shoulda/private_helpers.rb +13 -0
- data/lib/shoulda/proc_extensions.rb +14 -0
- data/lib/shoulda/rails.rb +13 -0
- data/lib/shoulda/rspec.rb +11 -0
- data/lib/shoulda/tasks.rb +3 -0
- data/lib/shoulda/tasks/list_tests.rake +29 -0
- data/lib/shoulda/tasks/yaml_to_shoulda.rake +28 -0
- data/lib/shoulda/test_unit.rb +22 -0
- data/rails/init.rb +7 -0
- data/test/README +36 -0
- data/test/fail_macros.rb +39 -0
- data/test/fixtures/addresses.yml +3 -0
- data/test/fixtures/friendships.yml +0 -0
- data/test/fixtures/posts.yml +5 -0
- data/test/fixtures/products.yml +0 -0
- data/test/fixtures/taggings.yml +0 -0
- data/test/fixtures/tags.yml +9 -0
- data/test/fixtures/users.yml +6 -0
- data/test/functional/posts_controller_test.rb +121 -0
- data/test/functional/users_controller_test.rb +19 -0
- data/test/matchers/active_record/allow_mass_assignment_of_matcher_test.rb +68 -0
- data/test/matchers/active_record/allow_value_matcher_test.rb +64 -0
- data/test/matchers/active_record/association_matcher_test.rb +263 -0
- data/test/matchers/active_record/ensure_inclusion_of_matcher_test.rb +80 -0
- data/test/matchers/active_record/ensure_length_of_matcher_test.rb +158 -0
- data/test/matchers/active_record/have_db_column_matcher_test.rb +169 -0
- data/test/matchers/active_record/have_db_index_matcher_test.rb +91 -0
- data/test/matchers/active_record/have_named_scope_matcher_test.rb +65 -0
- data/test/matchers/active_record/have_readonly_attributes_matcher_test.rb +29 -0
- data/test/matchers/active_record/validate_acceptance_of_matcher_test.rb +44 -0
- data/test/matchers/active_record/validate_format_of_matcher_test.rb +39 -0
- data/test/matchers/active_record/validate_numericality_of_matcher_test.rb +52 -0
- data/test/matchers/active_record/validate_presence_of_matcher_test.rb +86 -0
- data/test/matchers/active_record/validate_uniqueness_of_matcher_test.rb +147 -0
- data/test/matchers/controller/assign_to_matcher_test.rb +35 -0
- data/test/matchers/controller/filter_param_matcher_test.rb +32 -0
- data/test/matchers/controller/render_with_layout_matcher_test.rb +33 -0
- data/test/matchers/controller/respond_with_content_type_matcher_test.rb +32 -0
- data/test/matchers/controller/respond_with_matcher_test.rb +106 -0
- data/test/matchers/controller/route_matcher_test.rb +58 -0
- data/test/matchers/controller/set_session_matcher_test.rb +38 -0
- data/test/matchers/controller/set_the_flash_matcher.rb +41 -0
- data/test/model_builder.rb +106 -0
- data/test/other/autoload_macro_test.rb +18 -0
- data/test/other/context_test.rb +203 -0
- data/test/other/convert_to_should_syntax_test.rb +63 -0
- data/test/other/helpers_test.rb +340 -0
- data/test/other/private_helpers_test.rb +32 -0
- data/test/other/should_test.rb +271 -0
- data/test/rails_root/app/controllers/application_controller.rb +25 -0
- data/test/rails_root/app/controllers/posts_controller.rb +87 -0
- data/test/rails_root/app/controllers/users_controller.rb +84 -0
- data/test/rails_root/app/helpers/application_helper.rb +3 -0
- data/test/rails_root/app/helpers/posts_helper.rb +2 -0
- data/test/rails_root/app/helpers/users_helper.rb +2 -0
- data/test/rails_root/app/models/address.rb +7 -0
- data/test/rails_root/app/models/flea.rb +3 -0
- data/test/rails_root/app/models/friendship.rb +4 -0
- data/test/rails_root/app/models/pets/cat.rb +7 -0
- data/test/rails_root/app/models/pets/dog.rb +10 -0
- data/test/rails_root/app/models/post.rb +12 -0
- data/test/rails_root/app/models/product.rb +12 -0
- data/test/rails_root/app/models/profile.rb +2 -0
- data/test/rails_root/app/models/registration.rb +2 -0
- data/test/rails_root/app/models/tag.rb +8 -0
- data/test/rails_root/app/models/tagging.rb +4 -0
- data/test/rails_root/app/models/treat.rb +3 -0
- data/test/rails_root/app/models/user.rb +32 -0
- data/test/rails_root/app/views/layouts/posts.rhtml +19 -0
- data/test/rails_root/app/views/layouts/users.rhtml +17 -0
- data/test/rails_root/app/views/layouts/wide.html.erb +1 -0
- data/test/rails_root/app/views/posts/edit.rhtml +27 -0
- data/test/rails_root/app/views/posts/index.rhtml +25 -0
- data/test/rails_root/app/views/posts/new.rhtml +26 -0
- data/test/rails_root/app/views/posts/show.rhtml +18 -0
- data/test/rails_root/app/views/users/edit.rhtml +22 -0
- data/test/rails_root/app/views/users/index.rhtml +22 -0
- data/test/rails_root/app/views/users/new.rhtml +21 -0
- data/test/rails_root/app/views/users/show.rhtml +13 -0
- data/test/rails_root/config/boot.rb +110 -0
- data/test/rails_root/config/database.yml +4 -0
- data/test/rails_root/config/environment.rb +18 -0
- data/test/rails_root/config/environments/test.rb +0 -0
- data/test/rails_root/config/initializers/new_rails_defaults.rb +15 -0
- data/test/rails_root/config/initializers/shoulda.rb +8 -0
- data/test/rails_root/config/routes.rb +6 -0
- data/test/rails_root/db/migrate/001_create_users.rb +19 -0
- data/test/rails_root/db/migrate/002_create_posts.rb +13 -0
- data/test/rails_root/db/migrate/003_create_taggings.rb +12 -0
- data/test/rails_root/db/migrate/004_create_tags.rb +11 -0
- data/test/rails_root/db/migrate/005_create_dogs.rb +12 -0
- data/test/rails_root/db/migrate/006_create_addresses.rb +14 -0
- data/test/rails_root/db/migrate/007_create_fleas.rb +11 -0
- data/test/rails_root/db/migrate/008_create_dogs_fleas.rb +12 -0
- data/test/rails_root/db/migrate/009_create_products.rb +17 -0
- data/test/rails_root/db/migrate/010_create_friendships.rb +14 -0
- data/test/rails_root/db/migrate/011_create_treats.rb +12 -0
- data/test/rails_root/db/migrate/20090506203502_create_profiles.rb +12 -0
- data/test/rails_root/db/migrate/20090506203536_create_registrations.rb +14 -0
- data/test/rails_root/db/migrate/20090513104502_create_cats.rb +12 -0
- data/test/rails_root/db/schema.rb +0 -0
- data/test/rails_root/log/test.log +1 -0
- data/test/rails_root/public/404.html +30 -0
- data/test/rails_root/public/422.html +30 -0
- data/test/rails_root/public/500.html +30 -0
- data/test/rails_root/script/console +3 -0
- data/test/rails_root/script/generate +3 -0
- data/test/rails_root/test/shoulda_macros/custom_macro.rb +6 -0
- data/test/rails_root/vendor/gems/gem_with_macro-0.0.1/shoulda_macros/gem_macro.rb +6 -0
- data/test/rails_root/vendor/plugins/plugin_with_macro/shoulda_macros/plugin_macro.rb +6 -0
- data/test/rspec_test.rb +207 -0
- data/test/test_helper.rb +28 -0
- data/test/unit/address_test.rb +10 -0
- data/test/unit/cat_test.rb +7 -0
- data/test/unit/dog_test.rb +9 -0
- data/test/unit/flea_test.rb +6 -0
- data/test/unit/friendship_test.rb +6 -0
- data/test/unit/post_test.rb +19 -0
- data/test/unit/product_test.rb +23 -0
- data/test/unit/tag_test.rb +15 -0
- data/test/unit/tagging_test.rb +6 -0
- data/test/unit/user_test.rb +80 -0
- metadata +226 -0
data/test/test_helper.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
|
3
|
+
# Load the environment
|
4
|
+
ENV['RAILS_ENV'] = 'test'
|
5
|
+
|
6
|
+
rails_root = File.dirname(__FILE__) + '/rails_root'
|
7
|
+
|
8
|
+
require "#{rails_root}/config/environment.rb"
|
9
|
+
|
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 =
|
20
|
+
File.join(File.dirname(__FILE__), "fixtures")
|
21
|
+
|
22
|
+
class ActiveSupport::TestCase #:nodoc:
|
23
|
+
self.use_transactional_fixtures = false
|
24
|
+
self.use_instantiated_fixtures = false
|
25
|
+
end
|
26
|
+
|
27
|
+
require 'test/fail_macros'
|
28
|
+
require 'test/model_builder'
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class AddressTest < ActiveSupport::TestCase
|
4
|
+
fixtures :all
|
5
|
+
|
6
|
+
should_belong_to :addressable
|
7
|
+
should_validate_uniqueness_of :title, :scoped_to => [:addressable_id, :addressable_type]
|
8
|
+
should_ensure_length_at_least :zip, 5
|
9
|
+
should_validate_numericality_of :zip
|
10
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class Pets::DogTest < ActiveSupport::TestCase
|
4
|
+
should_belong_to :user
|
5
|
+
should_belong_to :address, :dependent => :destroy
|
6
|
+
should_have_many :treats
|
7
|
+
should_have_and_belong_to_many :fleas
|
8
|
+
should_validate_presence_of :owner_id, :treats, :fleas
|
9
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class PostTest < ActiveSupport::TestCase
|
4
|
+
fixtures :all
|
5
|
+
|
6
|
+
should_belong_to :user
|
7
|
+
should_belong_to :owner
|
8
|
+
should_have_many :tags, :through => :taggings
|
9
|
+
should_have_many :through_tags, :through => :taggings
|
10
|
+
|
11
|
+
should_validate_uniqueness_of :title
|
12
|
+
should_validate_presence_of :body, :message => /wtf/
|
13
|
+
should_validate_presence_of :title
|
14
|
+
should_validate_numericality_of :user_id
|
15
|
+
|
16
|
+
should_fail do
|
17
|
+
should_validate_uniqueness_of :title, :case_sensitive => false
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class ProductTest < ActiveSupport::TestCase
|
4
|
+
context "An intangible product" do
|
5
|
+
subject { Product.new(:tangible => false) }
|
6
|
+
|
7
|
+
should_validate_presence_of :title
|
8
|
+
should_not_allow_values_for :size, "22"
|
9
|
+
should_allow_values_for :size, "22kb"
|
10
|
+
should_ensure_value_in_range :price, 0..99
|
11
|
+
end
|
12
|
+
|
13
|
+
context "A tangible product" do
|
14
|
+
subject { Product.new(:tangible => true) }
|
15
|
+
|
16
|
+
should_validate_presence_of :price
|
17
|
+
should_ensure_value_in_range :price, 1..9999
|
18
|
+
should_ensure_value_in_range :weight, 1..100
|
19
|
+
should_not_allow_values_for :size, "22", "10x15"
|
20
|
+
should_allow_values_for :size, "12x12x1"
|
21
|
+
should_ensure_length_in_range :size, 5..20
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class TagTest < ActiveSupport::TestCase
|
4
|
+
should_have_many :taggings, :dependent => :destroy
|
5
|
+
should_have_many :posts
|
6
|
+
|
7
|
+
should_ensure_length_at_least :name, 2
|
8
|
+
|
9
|
+
should_not_allow_mass_assignment_of :secret
|
10
|
+
should_allow_mass_assignment_of :name
|
11
|
+
|
12
|
+
should_fail do
|
13
|
+
should_not_allow_mass_assignment_of :name
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class UserTest < ActiveSupport::TestCase
|
4
|
+
fixtures :all
|
5
|
+
|
6
|
+
should_have_many :posts
|
7
|
+
should_have_many :dogs
|
8
|
+
should_have_many :cats
|
9
|
+
|
10
|
+
should_have_many :friendships
|
11
|
+
should_have_many :friends
|
12
|
+
|
13
|
+
should_have_one :address
|
14
|
+
should_have_one :address, :dependent => :destroy
|
15
|
+
|
16
|
+
should_have_db_indices :email, :name
|
17
|
+
should_have_index :age
|
18
|
+
should_have_db_index [:email, :name], :unique => true
|
19
|
+
should_have_db_index :age, :unique => false
|
20
|
+
|
21
|
+
should_fail do
|
22
|
+
should_have_db_index :phone
|
23
|
+
should_have_db_index :email, :unique => false
|
24
|
+
should_have_db_index :age, :unique => true
|
25
|
+
end
|
26
|
+
|
27
|
+
should_have_named_scope :old, :conditions => "age > 50"
|
28
|
+
should_have_named_scope :eighteen, :conditions => { :age => 18 }
|
29
|
+
|
30
|
+
should_have_named_scope 'recent(5)', :limit => 5
|
31
|
+
should_have_named_scope 'recent(1)', :limit => 1
|
32
|
+
should_have_named_scope 'recent_via_method(7)', :limit => 7
|
33
|
+
|
34
|
+
context "when given an instance variable" do
|
35
|
+
setup { @count = 2 }
|
36
|
+
should_have_named_scope 'recent(@count)', :limit => 2
|
37
|
+
end
|
38
|
+
|
39
|
+
should_not_allow_values_for :email, "blah", "b lah"
|
40
|
+
should_allow_values_for :email, "a@b.com", "asdf@asdf.com"
|
41
|
+
should_allow_values_for :age, 1, 10, 99
|
42
|
+
should_not_allow_values_for :age, "a", "-"
|
43
|
+
should_not_allow_values_for :ssn, "a", 1234567890
|
44
|
+
should_ensure_length_in_range :email, 1..100
|
45
|
+
should_ensure_value_in_range :age, 1..100, :low_message => /greater/,
|
46
|
+
:high_message => /less/
|
47
|
+
should_fail do
|
48
|
+
should_ensure_value_in_range :age, 1..100, :low_message => /more/,
|
49
|
+
:high_message => /less/
|
50
|
+
end
|
51
|
+
should_fail do
|
52
|
+
should_ensure_value_in_range :age, 1..100, :low_message => /greater/,
|
53
|
+
:high_message => /fewer/
|
54
|
+
end
|
55
|
+
should_not_allow_mass_assignment_of :password
|
56
|
+
should_have_class_methods :find, :destroy
|
57
|
+
should_have_instance_methods :email, :age, :email=, :valid?
|
58
|
+
should_have_db_columns :name, :email, :age
|
59
|
+
should_have_db_column :id, :type => "integer"
|
60
|
+
should_have_db_column :email, :type => "string", :default => nil, :precision => nil, :limit => 255,
|
61
|
+
:null => true, :scale => nil
|
62
|
+
should_validate_acceptance_of :eula
|
63
|
+
should_validate_uniqueness_of :email, :scoped_to => :name, :case_sensitive => false
|
64
|
+
|
65
|
+
should_ensure_length_is :ssn, 9, :message => "Social Security Number is not the right length"
|
66
|
+
should_validate_numericality_of :ssn
|
67
|
+
|
68
|
+
should_have_readonly_attributes :name
|
69
|
+
|
70
|
+
should_fail do
|
71
|
+
should_not_allow_mass_assignment_of :name, :age
|
72
|
+
end
|
73
|
+
|
74
|
+
should_have_one :profile, :through => :registration
|
75
|
+
|
76
|
+
should_fail do
|
77
|
+
should_have_one :profile, :through => :interview
|
78
|
+
should_have_one :address, :through => :registration
|
79
|
+
end
|
80
|
+
end
|
metadata
ADDED
@@ -0,0 +1,226 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tpitale-shoulda
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.11.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tammer Saleh
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-10-13 00:00:00 -04:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description:
|
17
|
+
email: tsaleh@thoughtbot.com
|
18
|
+
executables:
|
19
|
+
- convert_to_should_syntax
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files:
|
23
|
+
- README.rdoc
|
24
|
+
- CONTRIBUTION_GUIDELINES.rdoc
|
25
|
+
files:
|
26
|
+
- CONTRIBUTION_GUIDELINES.rdoc
|
27
|
+
- MIT-LICENSE
|
28
|
+
- Rakefile
|
29
|
+
- README.rdoc
|
30
|
+
- bin/convert_to_should_syntax
|
31
|
+
- lib/shoulda/action_controller/macros.rb
|
32
|
+
- lib/shoulda/action_controller/matchers/assign_to_matcher.rb
|
33
|
+
- lib/shoulda/action_controller/matchers/filter_param_matcher.rb
|
34
|
+
- lib/shoulda/action_controller/matchers/render_with_layout_matcher.rb
|
35
|
+
- lib/shoulda/action_controller/matchers/respond_with_content_type_matcher.rb
|
36
|
+
- lib/shoulda/action_controller/matchers/respond_with_matcher.rb
|
37
|
+
- lib/shoulda/action_controller/matchers/route_matcher.rb
|
38
|
+
- lib/shoulda/action_controller/matchers/set_session_matcher.rb
|
39
|
+
- lib/shoulda/action_controller/matchers/set_the_flash_matcher.rb
|
40
|
+
- lib/shoulda/action_controller/matchers.rb
|
41
|
+
- lib/shoulda/action_controller.rb
|
42
|
+
- lib/shoulda/action_mailer/assertions.rb
|
43
|
+
- lib/shoulda/action_mailer.rb
|
44
|
+
- lib/shoulda/action_view/macros.rb
|
45
|
+
- lib/shoulda/action_view.rb
|
46
|
+
- lib/shoulda/active_record/assertions.rb
|
47
|
+
- lib/shoulda/active_record/helpers.rb
|
48
|
+
- lib/shoulda/active_record/macros.rb
|
49
|
+
- lib/shoulda/active_record/matchers/allow_mass_assignment_of_matcher.rb
|
50
|
+
- lib/shoulda/active_record/matchers/allow_value_matcher.rb
|
51
|
+
- lib/shoulda/active_record/matchers/association_matcher.rb
|
52
|
+
- lib/shoulda/active_record/matchers/ensure_inclusion_of_matcher.rb
|
53
|
+
- lib/shoulda/active_record/matchers/ensure_length_of_matcher.rb
|
54
|
+
- lib/shoulda/active_record/matchers/have_db_column_matcher.rb
|
55
|
+
- lib/shoulda/active_record/matchers/have_db_index_matcher.rb
|
56
|
+
- lib/shoulda/active_record/matchers/have_named_scope_matcher.rb
|
57
|
+
- lib/shoulda/active_record/matchers/have_readonly_attribute_matcher.rb
|
58
|
+
- lib/shoulda/active_record/matchers/validate_acceptance_of_matcher.rb
|
59
|
+
- lib/shoulda/active_record/matchers/validate_format_of_matcher.rb
|
60
|
+
- lib/shoulda/active_record/matchers/validate_numericality_of_matcher.rb
|
61
|
+
- lib/shoulda/active_record/matchers/validate_presence_of_matcher.rb
|
62
|
+
- lib/shoulda/active_record/matchers/validate_uniqueness_of_matcher.rb
|
63
|
+
- lib/shoulda/active_record/matchers/validation_matcher.rb
|
64
|
+
- lib/shoulda/active_record/matchers.rb
|
65
|
+
- lib/shoulda/active_record.rb
|
66
|
+
- lib/shoulda/assertions.rb
|
67
|
+
- lib/shoulda/autoload_macros.rb
|
68
|
+
- lib/shoulda/context.rb
|
69
|
+
- lib/shoulda/helpers.rb
|
70
|
+
- lib/shoulda/macros.rb
|
71
|
+
- lib/shoulda/minitest.rb
|
72
|
+
- lib/shoulda/private_helpers.rb
|
73
|
+
- lib/shoulda/proc_extensions.rb
|
74
|
+
- lib/shoulda/rails.rb
|
75
|
+
- lib/shoulda/rspec.rb
|
76
|
+
- lib/shoulda/tasks/list_tests.rake
|
77
|
+
- lib/shoulda/tasks/yaml_to_shoulda.rake
|
78
|
+
- lib/shoulda/tasks.rb
|
79
|
+
- lib/shoulda/test_unit.rb
|
80
|
+
- lib/shoulda.rb
|
81
|
+
- rails/init.rb
|
82
|
+
- test/fail_macros.rb
|
83
|
+
- test/fixtures/addresses.yml
|
84
|
+
- test/fixtures/friendships.yml
|
85
|
+
- test/fixtures/posts.yml
|
86
|
+
- test/fixtures/products.yml
|
87
|
+
- test/fixtures/taggings.yml
|
88
|
+
- test/fixtures/tags.yml
|
89
|
+
- test/fixtures/users.yml
|
90
|
+
- test/functional/posts_controller_test.rb
|
91
|
+
- test/functional/users_controller_test.rb
|
92
|
+
- test/matchers/active_record/allow_mass_assignment_of_matcher_test.rb
|
93
|
+
- test/matchers/active_record/allow_value_matcher_test.rb
|
94
|
+
- test/matchers/active_record/association_matcher_test.rb
|
95
|
+
- test/matchers/active_record/ensure_inclusion_of_matcher_test.rb
|
96
|
+
- test/matchers/active_record/ensure_length_of_matcher_test.rb
|
97
|
+
- test/matchers/active_record/have_db_column_matcher_test.rb
|
98
|
+
- test/matchers/active_record/have_db_index_matcher_test.rb
|
99
|
+
- test/matchers/active_record/have_named_scope_matcher_test.rb
|
100
|
+
- test/matchers/active_record/have_readonly_attributes_matcher_test.rb
|
101
|
+
- test/matchers/active_record/validate_acceptance_of_matcher_test.rb
|
102
|
+
- test/matchers/active_record/validate_format_of_matcher_test.rb
|
103
|
+
- test/matchers/active_record/validate_numericality_of_matcher_test.rb
|
104
|
+
- test/matchers/active_record/validate_presence_of_matcher_test.rb
|
105
|
+
- test/matchers/active_record/validate_uniqueness_of_matcher_test.rb
|
106
|
+
- test/matchers/controller/assign_to_matcher_test.rb
|
107
|
+
- test/matchers/controller/filter_param_matcher_test.rb
|
108
|
+
- test/matchers/controller/render_with_layout_matcher_test.rb
|
109
|
+
- test/matchers/controller/respond_with_content_type_matcher_test.rb
|
110
|
+
- test/matchers/controller/respond_with_matcher_test.rb
|
111
|
+
- test/matchers/controller/route_matcher_test.rb
|
112
|
+
- test/matchers/controller/set_session_matcher_test.rb
|
113
|
+
- test/matchers/controller/set_the_flash_matcher.rb
|
114
|
+
- test/model_builder.rb
|
115
|
+
- test/other/autoload_macro_test.rb
|
116
|
+
- test/other/context_test.rb
|
117
|
+
- test/other/convert_to_should_syntax_test.rb
|
118
|
+
- test/other/helpers_test.rb
|
119
|
+
- test/other/private_helpers_test.rb
|
120
|
+
- test/other/should_test.rb
|
121
|
+
- test/rails_root/app/controllers/application_controller.rb
|
122
|
+
- test/rails_root/app/controllers/posts_controller.rb
|
123
|
+
- test/rails_root/app/controllers/users_controller.rb
|
124
|
+
- test/rails_root/app/helpers/application_helper.rb
|
125
|
+
- test/rails_root/app/helpers/posts_helper.rb
|
126
|
+
- test/rails_root/app/helpers/users_helper.rb
|
127
|
+
- test/rails_root/app/models/address.rb
|
128
|
+
- test/rails_root/app/models/flea.rb
|
129
|
+
- test/rails_root/app/models/friendship.rb
|
130
|
+
- test/rails_root/app/models/pets/cat.rb
|
131
|
+
- test/rails_root/app/models/pets/dog.rb
|
132
|
+
- test/rails_root/app/models/post.rb
|
133
|
+
- test/rails_root/app/models/product.rb
|
134
|
+
- test/rails_root/app/models/profile.rb
|
135
|
+
- test/rails_root/app/models/registration.rb
|
136
|
+
- test/rails_root/app/models/tag.rb
|
137
|
+
- test/rails_root/app/models/tagging.rb
|
138
|
+
- test/rails_root/app/models/treat.rb
|
139
|
+
- test/rails_root/app/models/user.rb
|
140
|
+
- test/rails_root/app/views/layouts/posts.rhtml
|
141
|
+
- test/rails_root/app/views/layouts/users.rhtml
|
142
|
+
- test/rails_root/app/views/layouts/wide.html.erb
|
143
|
+
- test/rails_root/app/views/posts/edit.rhtml
|
144
|
+
- test/rails_root/app/views/posts/index.rhtml
|
145
|
+
- test/rails_root/app/views/posts/new.rhtml
|
146
|
+
- test/rails_root/app/views/posts/show.rhtml
|
147
|
+
- test/rails_root/app/views/users/edit.rhtml
|
148
|
+
- test/rails_root/app/views/users/index.rhtml
|
149
|
+
- test/rails_root/app/views/users/new.rhtml
|
150
|
+
- test/rails_root/app/views/users/show.rhtml
|
151
|
+
- test/rails_root/config/boot.rb
|
152
|
+
- test/rails_root/config/database.yml
|
153
|
+
- test/rails_root/config/environment.rb
|
154
|
+
- test/rails_root/config/environments/test.rb
|
155
|
+
- test/rails_root/config/initializers/new_rails_defaults.rb
|
156
|
+
- test/rails_root/config/initializers/shoulda.rb
|
157
|
+
- test/rails_root/config/routes.rb
|
158
|
+
- test/rails_root/db/migrate/001_create_users.rb
|
159
|
+
- test/rails_root/db/migrate/002_create_posts.rb
|
160
|
+
- test/rails_root/db/migrate/003_create_taggings.rb
|
161
|
+
- test/rails_root/db/migrate/004_create_tags.rb
|
162
|
+
- test/rails_root/db/migrate/005_create_dogs.rb
|
163
|
+
- test/rails_root/db/migrate/006_create_addresses.rb
|
164
|
+
- test/rails_root/db/migrate/007_create_fleas.rb
|
165
|
+
- test/rails_root/db/migrate/008_create_dogs_fleas.rb
|
166
|
+
- test/rails_root/db/migrate/009_create_products.rb
|
167
|
+
- test/rails_root/db/migrate/010_create_friendships.rb
|
168
|
+
- test/rails_root/db/migrate/011_create_treats.rb
|
169
|
+
- test/rails_root/db/migrate/20090506203502_create_profiles.rb
|
170
|
+
- test/rails_root/db/migrate/20090506203536_create_registrations.rb
|
171
|
+
- test/rails_root/db/migrate/20090513104502_create_cats.rb
|
172
|
+
- test/rails_root/db/schema.rb
|
173
|
+
- test/rails_root/log/test.log
|
174
|
+
- test/rails_root/public/404.html
|
175
|
+
- test/rails_root/public/422.html
|
176
|
+
- test/rails_root/public/500.html
|
177
|
+
- test/rails_root/script/console
|
178
|
+
- test/rails_root/script/generate
|
179
|
+
- test/rails_root/test/shoulda_macros/custom_macro.rb
|
180
|
+
- test/rails_root/vendor/gems/gem_with_macro-0.0.1/shoulda_macros/gem_macro.rb
|
181
|
+
- test/rails_root/vendor/plugins/plugin_with_macro/shoulda_macros/plugin_macro.rb
|
182
|
+
- test/README
|
183
|
+
- test/rspec_test.rb
|
184
|
+
- test/test_helper.rb
|
185
|
+
- test/unit/address_test.rb
|
186
|
+
- test/unit/cat_test.rb
|
187
|
+
- test/unit/dog_test.rb
|
188
|
+
- test/unit/flea_test.rb
|
189
|
+
- test/unit/friendship_test.rb
|
190
|
+
- test/unit/post_test.rb
|
191
|
+
- test/unit/product_test.rb
|
192
|
+
- test/unit/tag_test.rb
|
193
|
+
- test/unit/tagging_test.rb
|
194
|
+
- test/unit/user_test.rb
|
195
|
+
has_rdoc: true
|
196
|
+
homepage: http://thoughtbot.com/projects/shoulda
|
197
|
+
licenses: []
|
198
|
+
|
199
|
+
post_install_message:
|
200
|
+
rdoc_options:
|
201
|
+
- --line-numbers
|
202
|
+
- --main
|
203
|
+
- README.rdoc
|
204
|
+
require_paths:
|
205
|
+
- lib
|
206
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
207
|
+
requirements:
|
208
|
+
- - ">="
|
209
|
+
- !ruby/object:Gem::Version
|
210
|
+
version: "0"
|
211
|
+
version:
|
212
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
213
|
+
requirements:
|
214
|
+
- - ">="
|
215
|
+
- !ruby/object:Gem::Version
|
216
|
+
version: "0"
|
217
|
+
version:
|
218
|
+
requirements: []
|
219
|
+
|
220
|
+
rubyforge_project:
|
221
|
+
rubygems_version: 1.3.5
|
222
|
+
signing_key:
|
223
|
+
specification_version: 3
|
224
|
+
summary: Making tests easy on the fingers and eyes
|
225
|
+
test_files: []
|
226
|
+
|