Permalink
Browse files

little improvements on should-dsl usage

  • Loading branch information...
rodrigomanhaes committed Aug 27, 2011
1 parent fb1a05f commit edb230752199de39ce894c2bdf0edac7c1629c6c
Showing with 11 additions and 11 deletions.
  1. +2 −2 spec/decorable_spec.py
  2. +3 −3 spec/movement_spec.py
  3. +2 −2 spec/supportive/category_spec.py
  4. +4 −4 spec/supportive/rule_manager_spec.py
View
@@ -21,6 +21,6 @@ def it_gets_decorated(self):
def it_gest_undecorated(self):
self.a_node.decorate(self.a_decorator)
- self.a_node.undecorate(self.a_decorator) |should| equal_to(True)
- self.a_node.undecorate('Something else') |should| equal_to(False)
+ self.a_node.undecorate(self.a_decorator) |should| be(True)
+ self.a_node.undecorate('Something else') |should| be(False)
View
@@ -21,11 +21,11 @@ def it_typifies_itself(self):
another_node = Node()
self.movement.set_source(self.a_node)
#a transportation from a_node to Null
- self.movement.is_transportation() |should| equal_to(True)
+ self.movement.is_transportation() |should| be(True)
self.movement.set_destination(self.a_node)
#a transformation inside a_node
- self.movement.is_transformation() |should| equal_to(True)
+ self.movement.is_transformation() |should| be(True)
self.movement.set_destination(another_node)
#a transportation from a_node to another_node
- self.movement.is_transportation() |should| equal_to(True)
+ self.movement.is_transportation() |should| be(True)
@@ -9,8 +9,8 @@ def setUp(self):
def it_updates_its_super_category(self):
self.category.update_super_category('company','any type of company')
- self.category.super_category |should| be('company')
- self.category.description |should| be('any type of company')
+ self.category.super_category |should| equal_to('company')
+ self.category.description |should| equal_to('any type of company')
def it_includes_a_subcategory(self):
self.category.include_sub_category('manager','manages departments of the company')
@@ -24,17 +24,17 @@ def it_check_decoration_rules(self):
a_person = Person()
a_decorator = SomeDecorator()
passed, approved_rules, refused_rules = RuleManager.get_instance().check_decoration_rules(SomeDecorator, a_person)
- passed |should| equal_to(True)
+ passed |should| be(True)
approved_rules |should| contain('''Associated object should be instance of Person''')
- refused_rules |should| equal_to(None)
+ refused_rules |should| be(None)
SomeDecorator.decoration_rules = ['xxxxx']
(RuleManager.get_instance().check_decoration_rules, SomeDecorator, a_person) |should| throw(AttributeError)
#tear down
SomeDecorator.decoration_rules = ['should_be_instance_of_person']
def it_checks_a_rule(self):
a_person = Person()
- RuleManager.get_instance().check_rule('should_be_instance_of_person', a_person) |should| equal_to(True)
- RuleManager.get_instance().check_rule('should_be_instance_of_machine', a_person) |should| equal_to(False)
+ RuleManager.get_instance().check_rule('should_be_instance_of_person', a_person) |should| be(True)
+ RuleManager.get_instance().check_rule('should_be_instance_of_machine', a_person) |should| be(False)
(RuleManager.get_instance().check_rule, 'wrong rule...', a_person) |should| throw(AttributeError)

0 comments on commit edb2307

Please sign in to comment.