Skip to content

Instantly share code, notes, and snippets.

View flazz's full-sized avatar

Franco Lazzarino flazz

View GitHub Profile
#!/usr/bin/ruby
class BasicShell
attr_reader :env
def initialize
@env={ }
@env["prompt"] = "b> "
end
# this is a test script
ls "/Users"
cd "/Users/franco"
cat ".zshrc"
pwd
let "foo", "bar"
echo "lets all goto the $foo"
let "x", (1+1)
echo "$x should be two"
echo "done"
#!/usr/bin/ruby
class BasicShell
attr_reader :env
def initialize
@env={ }
@env["prompt"] = "b> "
end
XML::Error.set_handler(&XML::Error::QUIET_HANDLER)
<premis xmlns="info:lc/xmlns/premis-v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0">
<object xsi:type="representation">
<objectIdentifier>
<objectIdentifierType>URI</objectIdentifierType>
<objectIdentifierValue>info:fcla/daitss/E20090225_AAAIWH</objectIdentifierValue>
</objectIdentifier>
</object>
<event>
<eventIdentifier>
<eventIdentifierType>URI</eventIdentifierType>
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: test-packages/aips/good/file-md/FILE-0/.keep
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# DescribeService.log
md5 = Digest::MD5.new
md5 << File.read(filename)
puts [md5.hexdigest.scan(/../).pack("H2" * 16)].pack("m").chomp
last_response.body.should have_selector('h2') do |tag|
tag.should match_selector('.disabled')
tag.should contain('document is not well-formed')
end
# cucumber/rack-test output
expected following output to contain a <.disabled/> tag:
<h2 class="disabled">document is not well-formed</h2> (Spec::Expectations::ExpectationNotMetError)
./features/step_definitions/validation/validation_heading_steps.rb:8:in `__instance_exec0'
./features/step_definitions/validation/validation_heading_steps.rb:7:in `/^all headings except well formedness are visually disabled$/'
Given I navigate to the validation form page # features/step_definitions/validation/input_steps.rb:3
undefined method `assert' for #<Rack::Lint:0x1a13d70 @app=Sinatra::Application> (NoMethodError)
(eval):7:in `get'
(eval):2:in `visit'
./features/step_definitions/validation/input_steps.rb:4:in `/^I navigate to the validation form page$/'
features/validationinput.feature:5:in `Given I navigate to the validation form page'