aboutsummaryrefslogtreecommitdiffstats
path: root/spec/dummy/app
diff options
context:
space:
mode:
authorJamie Winsor <jamie@enmasse.com>2011-08-01 11:27:28 -0700
committerJamie Winsor <jamie@enmasse.com>2011-08-03 18:01:32 -0700
commit21b19db5a30fcb6db83f4ac9302cc94c6320a0db (patch)
tree62a3b89d0f4c9b239bfd76ec77cfc3269ac041ef /spec/dummy/app
parent3454a9c3007a4bfd10ccd0ff39dc594ebb2a0184 (diff)
downloadrefinerycms-blog-21b19db5a30fcb6db83f4ac9302cc94c6320a0db.tar.gz
refinerycms-blog-21b19db5a30fcb6db83f4ac9302cc94c6320a0db.tar.bz2
refinerycms-blog-21b19db5a30fcb6db83f4ac9302cc94c6320a0db.zip
refactor engine testing scenario
Engine is now tested standalone by leveraging a dummy rails app Enable Guard for speedy testing Move factories to the more standard location `spec/factories/*` Update README with a Testing section Rename migrations to contain datetimestamps for their version to fix migration order issues when migrating the dummy application
Diffstat (limited to 'spec/dummy/app')
-rw-r--r--spec/dummy/app/assets/javascripts/admin.js7
-rw-r--r--spec/dummy/app/assets/javascripts/application.js9
-rw-r--r--spec/dummy/app/assets/stylesheets/application.css1
-rw-r--r--spec/dummy/app/assets/stylesheets/application.css.backup1
-rw-r--r--spec/dummy/app/assets/stylesheets/formatting.css4
-rw-r--r--spec/dummy/app/assets/stylesheets/home.css4
-rw-r--r--spec/dummy/app/assets/stylesheets/theme.css4
-rw-r--r--spec/dummy/app/controllers/application_controller.rb3
-rw-r--r--spec/dummy/app/helpers/application_helper.rb2
-rw-r--r--spec/dummy/app/mailers/.gitkeep0
-rw-r--r--spec/dummy/app/models/.gitkeep0
-rw-r--r--spec/dummy/app/views/layouts/application.html.erb.backup14
-rw-r--r--spec/dummy/app/views/sitemap/index.xml.builder25
13 files changed, 74 insertions, 0 deletions
diff --git a/spec/dummy/app/assets/javascripts/admin.js b/spec/dummy/app/assets/javascripts/admin.js
new file mode 100644
index 0000000..23c4fb9
--- /dev/null
+++ b/spec/dummy/app/assets/javascripts/admin.js
@@ -0,0 +1,7 @@
+// Use this to customize the wymeditor boot process
+// Just mirror the options specified in boot_wym.js with the new options here.
+// This will completely override anything specified in boot_wym.js for that key.
+// e.g. skin: 'something_else'
+var custom_wymeditor_boot_options = {
+
+}; \ No newline at end of file
diff --git a/spec/dummy/app/assets/javascripts/application.js b/spec/dummy/app/assets/javascripts/application.js
new file mode 100644
index 0000000..37c7bfc
--- /dev/null
+++ b/spec/dummy/app/assets/javascripts/application.js
@@ -0,0 +1,9 @@
+// This is a manifest file that'll be compiled into including all the files listed below.
+// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
+// be included in the compiled file accessible from http://example.com/assets/application.js
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
+//= require jquery
+//= require jquery_ujs
+//= require_tree .
diff --git a/spec/dummy/app/assets/stylesheets/application.css b/spec/dummy/app/assets/stylesheets/application.css
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/spec/dummy/app/assets/stylesheets/application.css
@@ -0,0 +1 @@
+
diff --git a/spec/dummy/app/assets/stylesheets/application.css.backup b/spec/dummy/app/assets/stylesheets/application.css.backup
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/spec/dummy/app/assets/stylesheets/application.css.backup
@@ -0,0 +1 @@
+
diff --git a/spec/dummy/app/assets/stylesheets/formatting.css b/spec/dummy/app/assets/stylesheets/formatting.css
new file mode 100644
index 0000000..1132188
--- /dev/null
+++ b/spec/dummy/app/assets/stylesheets/formatting.css
@@ -0,0 +1,4 @@
+/*
+ Override default refinery formatting below.
+ Formatting applies to backend WYSIWYG editors and all frontend.
+*/ \ No newline at end of file
diff --git a/spec/dummy/app/assets/stylesheets/home.css b/spec/dummy/app/assets/stylesheets/home.css
new file mode 100644
index 0000000..824db99
--- /dev/null
+++ b/spec/dummy/app/assets/stylesheets/home.css
@@ -0,0 +1,4 @@
+/*
+ Override default refinery homepage styles here.
+ These only apply to the homepage of your site.
+*/ \ No newline at end of file
diff --git a/spec/dummy/app/assets/stylesheets/theme.css b/spec/dummy/app/assets/stylesheets/theme.css
new file mode 100644
index 0000000..8205050
--- /dev/null
+++ b/spec/dummy/app/assets/stylesheets/theme.css
@@ -0,0 +1,4 @@
+/*
+ Override default refinery 'theme' styles here.
+ These only apply when using custom WYMeditor CSS.
+*/ \ No newline at end of file
diff --git a/spec/dummy/app/controllers/application_controller.rb b/spec/dummy/app/controllers/application_controller.rb
new file mode 100644
index 0000000..e8065d9
--- /dev/null
+++ b/spec/dummy/app/controllers/application_controller.rb
@@ -0,0 +1,3 @@
+class ApplicationController < ActionController::Base
+ protect_from_forgery
+end
diff --git a/spec/dummy/app/helpers/application_helper.rb b/spec/dummy/app/helpers/application_helper.rb
new file mode 100644
index 0000000..de6be79
--- /dev/null
+++ b/spec/dummy/app/helpers/application_helper.rb
@@ -0,0 +1,2 @@
+module ApplicationHelper
+end
diff --git a/spec/dummy/app/mailers/.gitkeep b/spec/dummy/app/mailers/.gitkeep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/spec/dummy/app/mailers/.gitkeep
diff --git a/spec/dummy/app/models/.gitkeep b/spec/dummy/app/models/.gitkeep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/spec/dummy/app/models/.gitkeep
diff --git a/spec/dummy/app/views/layouts/application.html.erb.backup b/spec/dummy/app/views/layouts/application.html.erb.backup
new file mode 100644
index 0000000..9a8a761
--- /dev/null
+++ b/spec/dummy/app/views/layouts/application.html.erb.backup
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Dummy</title>
+ <%= stylesheet_link_tag "application" %>
+ <%= javascript_include_tag "application" %>
+ <%= csrf_meta_tags %>
+</head>
+<body>
+
+<%= yield %>
+
+</body>
+</html>
diff --git a/spec/dummy/app/views/sitemap/index.xml.builder b/spec/dummy/app/views/sitemap/index.xml.builder
new file mode 100644
index 0000000..8e89852
--- /dev/null
+++ b/spec/dummy/app/views/sitemap/index.xml.builder
@@ -0,0 +1,25 @@
+xml.instruct!
+
+xml.urlset "xmlns" => "http://www.sitemaps.org/schemas/sitemap/0.9" do
+
+ @locales.each do |locale|
+ ::I18n.locale = locale
+ ::Refinery::Page.live.in_menu.includes(:parts).each do |page|
+ # exclude sites that are external to our own domain.
+ page_url = if page.url.is_a?(Hash)
+ # This is how most pages work without being overriden by link_url
+ page.url.merge({:only_path => false})
+ elsif page.url.to_s !~ /^http/
+ # handle relative link_url addresses.
+ [request.protocol, request.host_with_port, page.url].join
+ end
+
+ # Add XML entry only if there is a valid page_url found above.
+ xml.url do
+ xml.loc url_for(page_url)
+ xml.lastmod page.updated_at.to_date
+ end if page_url.present? and page.show_in_menu?
+ end
+ end
+
+end