Skip to content

Commit 615f512

Browse files
committed
complete test
1 parent e9c5543 commit 615f512

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

magento/app/code/local/Crowd/Helloworld/Block/Message.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
class Crowd_Helloworld_Block_Message extends Mage_Core_Block_Abstract
44
{
5+
56
private $_stateAdapter;
67

78
public function __construct(array $services = array()){
@@ -14,14 +15,12 @@ public function __construct(array $services = array()){
1415
}
1516

1617
public function message(){
17-
1818
$state = $this->_stateAdapter;
1919

2020
if($state->isLoggedIn()){
2121
return 'Hello registered user';
2222
} else {
2323
return 'Hello guest, Please register with us for special offers';
2424
}
25-
2625
}
27-
}
26+
}

spec/app/code/local/Crowd/Helloworld/Block/MessageSpec.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ function it_is_initializable()
1717
$this->shouldHaveType('Crowd_Helloworld_Block_Message');
1818
}
1919

20-
function it_should_tell_you_that_you_most_register($adapter)
21-
{
20+
function it_should_tell_you_that_you_must_be_registered($adapter){
2221
$adapter->isLoggedIn()->willReturn(false);
2322
$this->message()->shouldReturn('Hello guest, Please register with us for special offers');
2423
}

0 commit comments

Comments
 (0)