'autotest' _should_ work for testing your extensions, but it will run
constantly in the background. Otherwise, just pass
EXT=my_extension_name to rake:
rake spec:extensions EXT=my_extension_name
Sean
Chris Parrish wrote:
One other thing. Is there a rake task to just run the specs for your
One other thing. Is there a rake task to just run the specs for your
extension?
I see 'rake spec:extensions' but that runs all the extension specs
(including the built-in ones included with Radiant). Is there something
like 'rake spec:extensions:my_extension_name'
During the development of
Man! I'm always so impressed with how "on the ball" you are. Thanks
for another super-quick reply.
As for my 2nd question, I'm trying to follow BDD principles and write
my specs before putting in any code. I was about to tackle the issue
where my extension allows the user to define configu
Great point Jim. I just stole this spec from the Radiant code (from
snippet_spec.rb). Maybe I'll submit a patch for them too :-) .
-Chris
Jim Gay wrote:
I would add that your spec should be more specific. When all of your
specs are generated they should be clear.
it "should validate format o
I would add that your spec should be more specific. When all of your
specs are generated they should be clear.
it "should validate format of name" gives you no information about
what that format should be. Your spec should describe how the
application functions, so if it were me, I'd write my
Chris,
For your first question:
it 'should insert an admin tab' do
Radiant::AdminUI.instance.tabs.any? {|tab| tab.name == "My Tab"
}.should be_true
end
Not sure what you mean to be testing in your second question.
In your third, I would avoid using the validations test_helper. Instead
do
So I am writing my first rSpec 'tests' formally and I'm running up
against some questions on making this work within Radiant. Can anyone
shed some light on how to spec for the following items:
* My extension should create a tab in the Admin UI. It should be
before or after certain oth