aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2015-02-26 10:54:33 +0000
committerLouise Crow <louise.crow@gmail.com>2015-02-26 10:54:33 +0000
commit06043da04c7307190bdb825dc5c0a36525b7203a (patch)
tree9dc46f15c1a53fa43e24a53041722d7e97ad41ca
parent3963b7bd2f9e9516b638003a28bdd0d549428de1 (diff)
parent049af6c6dafb5ee031240c724ab0759d9f1600ef (diff)
Merge branch 'runnable-tests' into develop
-rw-r--r--README.md7
-rw-r--r--assets/stylesheets/responsive/custom.scss4
-rw-r--r--lib/public_body_categories_en.rb16
-rw-r--r--spec/alavetelitheme_spec.rb11
-rw-r--r--test/alavetelitheme_test.rb4
-rw-r--r--test/test_helper.rb3
6 files changed, 24 insertions, 21 deletions
diff --git a/README.md b/README.md
index ebf8b4b..2662b4e 100644
--- a/README.md
+++ b/README.md
@@ -20,4 +20,11 @@ You can then switch the theme the application is using:
bundle exec rake themes:install
+## To run tests:
+
+To run tests, in the Alaveteli Rails.root (with this theme installed):
+
+ bundle exec rspec lib/themes/alavetelitheme/spec
+
+
Copyright (c) 2011 mySociety, released under the MIT license
diff --git a/assets/stylesheets/responsive/custom.scss b/assets/stylesheets/responsive/custom.scss
index 404ee0f..b7e8879 100644
--- a/assets/stylesheets/responsive/custom.scss
+++ b/assets/stylesheets/responsive/custom.scss
@@ -262,7 +262,7 @@ a.link_button_green_large {
}
/* Notices, errors */
-#notice, #error, .errorExplanation, #request_header_text, #hidden_request, .describe_state_form form, .undescribed_requests {
+#notice, #error, .errorExplanation, #request_header_text, #hidden_request, .describe_state_form form, .undescribed_requests, .warning {
border-top: 10px solid;
font-size: 1.2em;
border-radius: 0;
@@ -287,7 +287,7 @@ a.link_button_green_large {
border-color: $notice-border;
}
-#error, .errorExplanation, #hidden_request {
+#error, .errorExplanation, #hidden_request, .warning {
background-color: $error-bg;
border-color: $error-border;
diff --git a/lib/public_body_categories_en.rb b/lib/public_body_categories_en.rb
deleted file mode 100644
index a8969ba..0000000
--- a/lib/public_body_categories_en.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# The PublicBodyCategories structure works like this:
-# [
-# "Main category name",
-# [ "tag_to_use_as_category", "Sub category title", "sentence that can describes things in this subcategory" ],
-# [ "another_tag", "Second sub category title", "another descriptive sentence for things in this subcategory"],
-# "Another main category name",
-# [ "another_tag_2", "Another sub category title", "another descriptive sentence"]
-# ])
-
-PublicBodyCategories.add(:en, [
- "Silly ministries",
- [ "useless_agency", "Useless ministries", "a useless ministry" ],
- [ "lonely_agency", "Lonely agencies", "a lonely agency"],
- "Popular agencies",
- [ "popular_agency", "Popular agencies", "a lonely agency"]
-])
diff --git a/spec/alavetelitheme_spec.rb b/spec/alavetelitheme_spec.rb
new file mode 100644
index 0000000..0bb0fab
--- /dev/null
+++ b/spec/alavetelitheme_spec.rb
@@ -0,0 +1,11 @@
+# If defined, ALAVETELI_TEST_THEME will be loaded in config/initializers/theme_loader
+ALAVETELI_TEST_THEME = 'alavetelitheme'
+require File.expand_path(File.join(File.dirname(__FILE__),'..','..','..','..','spec','spec_helper'))
+
+describe "testing the truth" do
+
+ it 'should be true' do
+ assert true
+ end
+
+end
diff --git a/test/alavetelitheme_test.rb b/test/alavetelitheme_test.rb
index 9e9e34f..3e2d782 100644
--- a/test/alavetelitheme_test.rb
+++ b/test/alavetelitheme_test.rb
@@ -1,8 +1,8 @@
-require 'test_helper'
-
+require File.expand_path(File.join(File.dirname(__FILE__), 'test_helper'))
class AlavetelithemeTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
+
end
diff --git a/test/test_helper.rb b/test/test_helper.rb
index cf148b8..a2052ee 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -1,3 +1,4 @@
require 'rubygems'
require 'active_support'
-require 'active_support/test_case' \ No newline at end of file
+require 'minitest/autorun'
+require 'active_support/test_case'