Skip to content
Browse files

added feature for session code

  • Loading branch information...
1 parent 12e9632 commit a58a03b2b4de5239580ddfea9eec962031125f2e @mkristian committed Sep 5, 2011
View
8 resty-generators/TODO
@@ -1,6 +1,6 @@
-* has_many is singular
+o [kristian] has_many is singular
-* also plurarl names of fields become singular
+o [kristian] also plurarl names of fields become singular
* active_Record not found on generate migration
@@ -12,4 +12,6 @@ o [kristian] notice should be set to null on successful creation on
o [kristian] first login after timeout fails
-* test 'generate model' as well
+* test 'generate model' as well
+
+* test optimistic
View
25 resty-generators/features/generators.feature
@@ -39,4 +39,29 @@ Feature: Generators for Resty
And I execute "compile gwt:compile"
Then the output should contain "Compilation succeeded"
+ Given me an existing rails application "simple"
+ And I execute "rails generate model cars name:string"
+ And I execute "compile gwt:compile"
+ Then the output should contain "Compilation succeeded"
+
+
+
+ Scenario: Create a gwt rails application with session and menu
+ Given I create new rails application with template "complete.template" and "complete" tests
+ And I execute "rails generate resty:setup com.example --session --menu"
+ Then the output should contain "src/main/java/com/example/client/SessionActivityPlaceActivityMapper.java" and "src/main/java/com/example/client/managed/CompleteMenuPanel.java" and "src/main/java/com/example/client/activities/LoginActivity.java"
+
+ Given me an existing rails application "complete"
+ And I execute "compile gwt:compile"
+ Then the output should contain "Compilation succeeded"
+
+ Given me an existing rails application "complete"
+ And I execute "rails generate scaffold accounts name:string"
+ And I execute "compile gwt:compile"
+ Then the output should contain "Compilation succeeded"
+
+ Given me an existing rails application "complete"
+ And I execute "rake db:migrate test"
+ Then the output should contain "1 tests, 1 assertions, 0 failures, 0 errors" and "7 tests, 10 assertions, 0 failures, 0 errors"
+
View
2 resty-generators/lib/generators/resty/setup/templates/authentication.rb
@@ -1,3 +1,3 @@
class Authentication < ActiveResource::Base
- self.site = Rails.application.config.remote_sso_url
+ self.site = Rails.application.config.remote_sso_url if Rails.application.config.respond_to? :remote_sso_url
end
View
7 resty-generators/templates/complete.template
@@ -0,0 +1,7 @@
+#-*- mode: ruby -*-
+
+gem 'ruby-maven', '0.8.3.0.3.0.28.3'
+gem 'resty-generators', :path => '../..'
+gem 'ixtlan-generators' # needed since ruby-maven does not resolve deps from resty-generators due to the path argument
+
+# vim: syntax=Ruby
View
14 resty-generators/templates/tests-complete/test_helper.rb
@@ -0,0 +1,14 @@
+ENV["RAILS_ENV"] = "test"
+require File.expand_path('../../config/environment', __FILE__)
+require 'rails/test_help'
+
+class ActiveSupport::TestCase
+ # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
+ #
+ # Note: You'll currently still have to declare fixtures explicitly in integration tests
+ # -- they do not yet inherit this setting
+ fixtures :all
+
+ # Add more helper methods to be used by all tests here...
+end
+::ActionController::Base.send(:include, ::Ixtlan::ActionController::Guard::RootGroup)

0 comments on commit a58a03b

Please sign in to comment.
Something went wrong with that request. Please try again.