Skip to content

Commit

Permalink
Start moving merb-helpers fixtures towards a real app.
Browse files Browse the repository at this point in the history
Using real small app gives us some nice possibilities:
* It lets us figure out how well view matchers work.
* It lets us use real models instead of fake objects.
* It lets us easily add use cases from reports.
* It lets us reveal issues with -helpers related to changes in ORMs.
* It provides a lot of examples of how people test views =>
  we can copy them over to documentation as examples.

Please consider never using fake objects in helper specs.
  • Loading branch information
michaelklishin committed Oct 5, 2008
1 parent b9faa6b commit 5d0f4ab
Show file tree
Hide file tree
Showing 30 changed files with 61 additions and 51 deletions.
2 changes: 2 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/bound_check_box.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class BoundCheckBoxSpecs < SpecController
end
2 changes: 2 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/bound_file_field.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class BoundFileFieldSpecs < SpecController
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class BoundHiddenFieldSpecs < SpecController
end
2 changes: 2 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/bound_option_tag.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class BoundOptionTagSpecs < SpecController
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class BoundPasswordFieldSpecs < SpecController
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class BoundRadioButtonSpecs < SpecController
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class BoundRadioGroupSpecs < SpecController
end
2 changes: 2 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/bound_select.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class BoundSelectSpecs < SpecController
end
2 changes: 2 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/bound_text_area.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class BoundTextAreaSpecs < SpecController
end
2 changes: 2 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/bound_text_field.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class BoundTextFieldSpecs < SpecController
end
2 changes: 2 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/button.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class ButtonSpecs < SpecController
end
2 changes: 2 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/check_box.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class CheckBoxSpecs < SpecController
end
2 changes: 2 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/custom_builder.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class CustomBuilderSpecs < SpecController
end
2 changes: 2 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/delete_button.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class DeleteButtonSpecs < SpecController
end
2 changes: 2 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/field_set.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class FieldsetSpecs < SpecController
end
3 changes: 3 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/fields_for.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class FieldsForSpecs < SpecController

end
2 changes: 2 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/file_field.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class FileFieldSpecs < SpecController
end
2 changes: 2 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/form.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class FormSpecs < SpecController
end
2 changes: 2 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/form_for.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class FormForSpecs < SpecController
end
2 changes: 2 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/hidden_field.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class HiddenFieldSpecs < SpecController
end
3 changes: 3 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/label.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class LabelSpecs < SpecController

end
2 changes: 2 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/option_tag.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class OptionTagSpecs < SpecController
end
2 changes: 2 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/password_field.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class PasswordFieldSpecs < SpecController
end
2 changes: 2 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/radio_button.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class RadioButtonSpecs < SpecController
end
2 changes: 2 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/radio_group.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class RadioGroupSpecs < SpecController
end
2 changes: 2 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/select.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class SelectSpecs < SpecController
end
51 changes: 0 additions & 51 deletions merb-helpers/spec/fixture/app/controllers/specs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,54 +9,3 @@
class SpecController < Merb::Controller
layout nil
end

# Forms, FieldSets, and Labels
class FormSpecs < SpecController ; end
class FormForSpecs < SpecController ; end
class FieldsForSpecs < SpecController ; end
class FieldsetSpecs < SpecController ; end
class LabelSpecs < SpecController ; end

# Text fields
class TextFieldSpecs < SpecController ; end
class BoundTextFieldSpecs < SpecController ; end

# Passwords
class PasswordFieldSpecs < SpecController ; end
class BoundPasswordFieldSpecs < SpecController ; end

# TextAreas
class TextAreaSpecs < SpecController ; end
class BoundTextAreaSpecs < SpecController ; end

# Checkboxes
class CheckBoxSpecs < SpecController ; end
class BoundCheckBoxSpecs < SpecController ; end

# Hidden Fields
class HiddenFieldSpecs < SpecController ; end
class BoundHiddenFieldSpecs < SpecController ; end

# Radio Buttons
class RadioButtonSpecs < SpecController ; end
class BoundRadioButtonSpecs < SpecController ; end
class RadioGroupSpecs < SpecController ; end
class BoundRadioGroupSpecs < SpecController ; end

# Selects and Options
class SelectSpecs < SpecController ; end
class BoundSelectSpecs < SpecController ; end
class OptionTagSpecs < SpecController ; end
class BoundOptionTagSpecs < SpecController ; end

# Files
class FileFieldSpecs < SpecController ; end
class BoundFileFieldSpecs < SpecController ; end

# Buttons and Inputs
class SubmitSpecs < SpecController ; end
class ButtonSpecs < SpecController ; end
class DeleteButtonSpecs < SpecController ; end

# Custom builders
class CustomBuilderSpecs < SpecController ; end
2 changes: 2 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/submit.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class SubmitSpecs < SpecController
end
2 changes: 2 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/text_area.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class TextAreaSpecs < SpecController
end
3 changes: 3 additions & 0 deletions merb-helpers/spec/fixture/app/controllers/text_field.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class TextFieldSpecs < SpecController

end

0 comments on commit 5d0f4ab

Please sign in to comment.