File: app_inception.rb

package info (click to toggle)
camping 3.2.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,312 kB
  • sloc: ruby: 5,032; javascript: 2,362; makefile: 29
file content (46 lines) | stat: -rw-r--r-- 1,356 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
require 'test_helper'
require 'camping'
require 'camping/commands'

# The idea behind the inception stuff is that you can inherit settings
# templates, etc... from a Camping app and just... extend it.
# This is a tabled, but not abandoned idea. It became a little difficult
# to inherit all of these things, along with views, Models, etc... that's
# associated with a camping app. Getting this to work would mean a big
# rewrite of Camping's core, which is a no no.

Camping.goes :Inception
# Inception.goes :Leonardo
# Leonardo.goes :Donatello

class Inception::Test < TestCase
  def the_app
    app = Camping::Apps.select{|a| a.name == "Inception" }.first
    app.make_camp
    app
  end

#   def the_child
#     app = Inception::Apps.select{|a| a.name == "Leonardo" }.first
#     app.make_camp
#     app
#   end
#
#   def the_brother
#     app = Leonardo::Apps.select{|a| a.name == "Donatello" }.first
#     app.make_camp
#     app
#   end

  # Test that the S is pretty big in the app.
  # def test_has_big_s
  #   s = the_app::S
  #   c = the_child::S
  #   b = the_brother::S
  #   # assert (s.length == c.length), "This S is the wrong length. parent: #{s.length}, child: #{c.length}."
  #   assert (c.length == b.length), "This S is the wrong length. child: #{c.length}, brother: #{b.length}."
  # end

  # Test that a Gsubbed S is equivalent.

end