This file contains 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 File.dirname(__FILE__) + '/../spec_helper' | |
Machinist::load_blueprint :user | |
describe User do | |
describe 'Adam Administrator' do | |
before do | |
@adam = User.make(:role => "Administrator") | |
end | |
it 'can create administrators' do |
This file contains 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
module Machinist | |
class << self | |
def load_blueprint(name) | |
require "#{RAILS_ROOT}/blueprints/#{name}.rb" | |
end | |
end | |
end |
This file contains 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
for UNIT in `ls app/controllers` | |
do | |
sed s/class\ /class\ Admin::/g $UNIT > app/controllers/admin/$UNIT | |
rm app/controllers/$UNIT | |
done |
This file contains 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
httpd: apr_sockaddr_info_get() failed for plus2sandbox | |
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName | |
Syntax OK | |
Stopping apache22. | |
Waiting for PIDS: 83198. | |
Performing sanity check on apache22 configuration: | |
httpd: apr_sockaddr_info_get() failed for plus2sandbox | |
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName | |
Syntax OK | |
Starting apache22. |
This file contains 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
Then /^I should see an ordered list of "(.*)"$/ do |dom_id| | |
response.should have_selector("ol##{dom_id}") | |
end |
This file contains 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
class MyWorld < Cucumber::Rails::World | |
include Webrat::Matchers | |
end | |
World do | |
MyWorld.new | |
end |
This file contains 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
static VALUE | |
rb_ary_uniq_bang(ary) | |
VALUE ary; | |
{ | |
VALUE hash, v, vv; | |
long i, j; | |
hash = ary_make_hash(ary, 0); | |
if (RARRAY(ary)->len == RHASH(hash)->tbl->num_entries) { |
This file contains 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
class Foo | |
attr_accessor :some_attr | |
def initialize(val) | |
self.some_attr = val | |
end | |
def ==(other) | |
self.some_attr == other.some_attr | |
end | |
end |
This file contains 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
class Foo | |
attr_accessor :some_attr | |
def initialize(val) | |
self.some_attr = val | |
end | |
def hash | |
self.some_attr.hash | |
end | |
end |
This file contains 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
<image type="Synoptic chart" subtype="Analysis" day="0" width="640" height="480" format="JPEG"> | |
<issue_day_name>Wednesday</issue_day_name> | |
<issue_time_local tz="EDT">2008-12-17T15:20:00</issue_time_local> | |
<valid_time tz="EDT">2008-12-17T16:00:00</valid_time> | |
<text> | |
A trough extending across southern Australia is bringing showers and storms, potentially severe in SA and VIC. Cool winds behind a cold front are affecting TAS. A monsoon trough and low are bringing heavy storms to the NT and WA whilst warm northerlies affect the remainder. The northern jet is dipping well south, allowing very warm air to reach southern coasts. The polar jet is directing a mass of cold air over the TAS, bringing below average temperatures. | |
</text> | |
<url scheme="" domain="" path="" filename="" parameters=""> | |
http://www.weatherzone.com.au/httpdata_r/images/synoptic/wz_syn_aus_d0_640x480.jpg | |
</url> |
OlderNewer