Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

little improvements on should-dsl usage

  • Loading branch information...
commit edb230752199de39ce894c2bdf0edac7c1629c6c 1 parent fb1a05f
Rodrigo Manhães authored August 26, 2011
4  spec/decorable_spec.py
@@ -21,6 +21,6 @@ def it_gets_decorated(self):
21 21
 
22 22
     def it_gest_undecorated(self):
23 23
         self.a_node.decorate(self.a_decorator)
24  
-        self.a_node.undecorate(self.a_decorator) |should| equal_to(True)
25  
-        self.a_node.undecorate('Something else') |should| equal_to(False)
  24
+        self.a_node.undecorate(self.a_decorator) |should| be(True)
  25
+        self.a_node.undecorate('Something else') |should| be(False)
26 26
 
6  spec/movement_spec.py
@@ -21,11 +21,11 @@ def it_typifies_itself(self):
21 21
         another_node = Node()
22 22
         self.movement.set_source(self.a_node)
23 23
         #a transportation from a_node to Null
24  
-        self.movement.is_transportation() |should| equal_to(True)
  24
+        self.movement.is_transportation() |should| be(True)
25 25
         self.movement.set_destination(self.a_node)
26 26
         #a transformation inside a_node
27  
-        self.movement.is_transformation() |should| equal_to(True)
  27
+        self.movement.is_transformation() |should| be(True)
28 28
         self.movement.set_destination(another_node)
29 29
         #a transportation from a_node to another_node
30  
-        self.movement.is_transportation() |should| equal_to(True)
  30
+        self.movement.is_transportation() |should| be(True)
31 31
 
4  spec/supportive/category_spec.py
@@ -9,8 +9,8 @@ def setUp(self):
9 9
 
10 10
     def it_updates_its_super_category(self):
11 11
         self.category.update_super_category('company','any type of company')
12  
-        self.category.super_category |should| be('company')
13  
-        self.category.description |should| be('any type of company')
  12
+        self.category.super_category |should| equal_to('company')
  13
+        self.category.description |should| equal_to('any type of company')
14 14
 
15 15
     def it_includes_a_subcategory(self):
16 16
         self.category.include_sub_category('manager','manages departments of the company')
8  spec/supportive/rule_manager_spec.py
@@ -24,9 +24,9 @@ def it_check_decoration_rules(self):
24 24
         a_person = Person()
25 25
         a_decorator = SomeDecorator()
26 26
         passed, approved_rules, refused_rules = RuleManager.get_instance().check_decoration_rules(SomeDecorator, a_person)
27  
-        passed |should| equal_to(True)
  27
+        passed |should| be(True)
28 28
         approved_rules |should| contain('''Associated object should be instance of Person''')
29  
-        refused_rules |should| equal_to(None)
  29
+        refused_rules |should| be(None)
30 30
         SomeDecorator.decoration_rules = ['xxxxx']
31 31
         (RuleManager.get_instance().check_decoration_rules, SomeDecorator, a_person) |should| throw(AttributeError)
32 32
         #tear down
@@ -34,7 +34,7 @@ def it_check_decoration_rules(self):
34 34
 
35 35
     def it_checks_a_rule(self):
36 36
         a_person = Person()
37  
-        RuleManager.get_instance().check_rule('should_be_instance_of_person', a_person) |should| equal_to(True)
38  
-        RuleManager.get_instance().check_rule('should_be_instance_of_machine', a_person) |should| equal_to(False)
  37
+        RuleManager.get_instance().check_rule('should_be_instance_of_person', a_person) |should| be(True)
  38
+        RuleManager.get_instance().check_rule('should_be_instance_of_machine', a_person) |should| be(False)
39 39
         (RuleManager.get_instance().check_rule, 'wrong rule...', a_person) |should| throw(AttributeError)
40 40
 

0 notes on commit edb2307

Please sign in to comment.
Something went wrong with that request. Please try again.