This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
My great log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "spec_helper" | |
describe User do | |
it { should allow_mass_assignment_of(:email) } | |
it { should allow_mass_assignment_of(:password) } | |
it { should allow_mass_assignment_of(:password_confirmation) } | |
it { should validate_uniqueness_of(:email) } | |
it { should allow_value("[email protected]").for(:email) } | |
it { should_not allow_value("blah").for(:email) } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$this->container->set('fixture.student', new Definition('Framework\Test\DependencyInjection\Fixture\Student', array( | |
new DefinitionArgument($this->container, 'fixture.person'), | |
new StaticArgument(Person::LENGTH) | |
))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# src/tests/unit-tests/bootstrap.php | |
require_once('gwc.autoloader.php'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class User | |
{ | |
protected $id; | |
protected $name; | |
public function setId($id) | |
{ | |
$this->id = $id; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: User Authentication | |
In order to play the game | |
As an registrered user | |
I want to be able to login | |
Background: | |
Given I have the user "[email protected]" with password "foobar" | |
Scenario: Logging in with incorrect credentials | |
Given I am on the login page |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe SessionController do | |
it "should show the login page at new action" do | |
get :new | |
response.should be_success | |
end | |
context "authentication failure" do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
zones_directory = "/var/named/slaves/*.hosts" | |
domains = Dir.glob(zones_directory).collect { |file| File.basename(file).sub(".hosts", "") } | |
domains.each do |domain| | |
print `rndc retransfer #{domain}` | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class sfMessageSource_Doctrine extends sfMessageSource | |
{ | |
public function &loadData($variant) | |
{ | |
$rows = Doctrine_Query::create() | |
->from('TransUnit t') | |
->leftJoin('t.Catalogue c') | |
->where('c.name=?', $variant) |