Harry Seldon's blog

Fractals, Chaos, and Control Systems on Rails

Read

A test and example app for Open Flash Chart Rails plugin

Posted by Harry Seldon on November 07, 2008

On October 24th, David Lowenfels aka dfl added the beginning of a test app in OFC plugin. As I had myself a local test app used to play around with OFC I thought it would be nice to add my test code in the OFC plugin. This code is actually made mainly by Charlie’s examples taken from his blog and my own examples.

A test app would be useful for 2 main reasons. The first one, as it says, is for testing purposes. The recent changes brought to OFC plugin were great but they were lacking some tests (functional tests and backward compatibility tests). So more tests are definitely necessary. The other reason which is almost more important is the need for working examples. The examples exist on Charlie’s blog and they are very helpful. As they exist why not gather them in an example app ? The examples will be yet more useful and clear.

So first, I worked directly on the app put by dfl in the test directory. But quickly I found it weird to have an application inside a plugin and using this plugin with the application inside etc. You get the kind of recursive situation (not as bad as it seems though!). So I proposed to Charlie to simply make a side test app. For now, the app is here in my repo on github but as it is more natural to put it close to the OFC plugin, Charlie will fork it and the “official” repo will be on his github repo probably here [EDIT: this is done].

[EDIT] If you also have your own OFC test app, and you want to contribute, have a look at this post explaining how to do it with GIT.

Taken from the README :
Both a testing and tutorial application for Rails Open Flash Chart Plugin.
Version 0.2.0
1) Install with:

git clone git://github.com/harryseldon/ofc_test_app.git    

EDIT PullMonkey’s version not up to date.

git clone git://github.com/pullmonkey/ofc_test_app.git    

2) Run your server:

script/server -p 3000   

3) Go to http://localhost:3000/test_it/all_graphs
You will see all the graphs, like here.

EDIT 3/9/2009 This app is running live here.

All your comments on how to test a Rails plugin are welcome.

Posted in | no comments | Tags , , , , , | atom

Delicious

Trackbacks

Use the following link to trackback from your own site:
http://harryseldon.thinkosphere.com/trackbacks?article_id=23

  1. test typo markdown3 From Le blog de la PensoSphère
    Grand Gardening with GIT **Why is [GIT](http://git.or.cz) so interesting ?** With git, I have been doing some gardening these days. Indeed I growed trees, cut branches, grafted branches. I have been using a Version Control System (VCS) only for on...
  2. News from Open Flash Chart From Harry Seldon's blog
    In November, [Open Flash Chart](http://teethgrinder.co.uk/open-flash-chart-2/downloads.php) was updated with some new features and bugfixes. [OFC rails plugin](http://pullmonkey.com/2008/10/25/open-flash-chart-ii-updates-radar-charts-and-scatter-l...
  3. Open Flash Charts examples with Rails From Harry Seldon's blog
    I have updated the [ofc test app](http://harryseldon.thinkosphere.com/2008/11/07/a-test-and-example-app-for-open-flash-chart-rails-plugin) with the examples given by [Giovanni](http://ingiroingiro.blogspot.com/). You have: * [A radar chart with it...

Comments

Leave a response

Leave a comment

Markdown enabled




Search

Sponsor