---
gem install spec_wire
# unknown configuration setsp (mybe a shell script or generator)
# start whatever server
cd working_dir/
eidt first_spec.rb
---- first_spec.rb ----
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
describe "First" do
before(:each) do
@obj = First.new
end
it "should report an attribute" do
@obj.value.should == "hello spec_wire"
end
end
-----
spec first_spec.rb
--- it should fail ---
Add a file in your server' root: First.php
--- First.php ----
<?php
class First {
function __construct() {
}
function value() {
return "hello spec_wire";
}
}
?>
spec first_spec.rb
# and it shall come to pass
##################
Anyway, that is my goal for rev 0.3.3.
Can you do the following?
Get a Github account and tell me your username there.
Add your ssh public key to your account at Github
--- Once you do that I'll add you to the project.
In the meantime. We need to make the gem, "a gem".
(all commands are assumed to be run from the main spec_wire direcotry,
unless otherwise spelled out)
# whenever writing code, write a failing test first.
Edit spec/gem_spec.rb
--- spec/gem_spec.rb ---
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
describe "Gem" do
describe "loading const module" do
it "should have an attribute we can check somehow" do
# ruby code to detect if a file has been loaded
end
end
end
----
Edit the contents of lib/spec_wire.rb
Erase all of its contents
Add a require for const.rb
spec spec/gem_spec.rb
# Should pass.
git add lib
# a shortcut is to 'git add .' but that will add everything including
any tmp/crud you don't want
# unless you've ignored them by editing the .gitignore file ... a chore
(start the server)
rake spec
# if all pass
git commit -m "your comment - specs passing"
rake github:release
That's it.
I'll 'git pull' then attempt to build the gem and test as above.
I will:
git commit -m "my stuff...."
rake build
rake install # installs locally
# test as above
... loop til done
rake version:bump:patch
rake github:release
Then you can try the last steps yourself.
Ed
Ed
--
Ed Howland
http://greenprogrammer.wordpress.com
http://twitter.com/ed_howland