The current trunk on Github contains a working spec_wire command. You
can use it to drop a directory tree into your project similar to the
rspec and cucumber commands do in Rails projects.
This is seriously a prototype. I've only tested in on my Mac.
Usage:
cd [project_root]
[path to]/spec_wire/bin/spec_wire .
=> creates a PHP template with:
[project root]/spec
[project root]/features
-- or --
[path to]/spec_wire/bin/spec_wire --ruby source_folder
=> creates a Ruby template with:
spurce_folder/spec
spurce_folder/features
There are many options:
--dry_run # self-explanatory
--force # forces overwriting files -- use with care
--version # prints version of spec_wire
--server-url # specify a different URL
--help for more usage info
Please pull and test in Linux.
The subdir spec/server contains the server for whichever language you
targeted. You could tarball ir and dump it on a LAMP server w/o any
Ruby. Then point the config.server_url to the new place.
The current version does not support running files through ERb. But it
tells you to modify the condif files with and example you can copy and
paste.
The next step is finding out how Rubygems installs scripts like this
in the user's path.
Please let me know if it is too confusing.
Cheers,
Ed
Ed Howland
http://greenprogrammer.wordpress.com
http://twitter.com/ed_howland
To use it, use the source form Githb, not the gem itself.
I.e. git pull origin amster --or -- git clone
hhttp://github.com/edhowland/spec_wire.git
Then rake build && sudo rake install. You might want to inonstall any
previous gem versions first.
Then in some PHP folder:
spec_wire .
This shoild copy the PHP template and you should have two folders spec
and features. This program will output a message thanking you for usin
spec_wire and telling you to update the spec_helper.rb file with a
config.derver_url. Copy this and edit the spec/spec_helper.rb and
features/support/env.rb
Then in the spec dir:
spec initail spec.rb
This should pass and if it does you are wired up correctly.
Now write some specs and cukes and you are off and running.
This is essentially the same as in the README.rdoc file and on the githb site.
I can'r seem to get hyperlinks to work in my rdoc stuff. Any ideas?
Cheers,
Ed
Secret sauce: Put no space between the asterisk and the start of the line:
not
* http://www.example.com
Ed